get_expanded_element_index

get_expanded_element_index(sequence_name, element_name)

Return index of element with specified name in the expanded sequence.

NOTE: this is the brute-force linear-time algorithm and therefore not recommended for frequent execution.

Parameters:
  • sequence_name (str) – sequence name

  • element_name (str) – element index

Return type:

int

Returns:

the index of the specified element, -1 if not found

Raises:

ValueError – if the sequence is invalid