def _front_id_from_idx(front, index):
fidx, sidx = index<EOL>id = front[fidx, sidx]<EOL>if id == <NUM_LIT:0>:<EOL><INDENT>return -<NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>return id<EOL><DEDENT>
Returns the front ID found in `front` at the given `index`.

:param front:               An onset or offset front array of shape [nfrequencies, nsamples]
:index:                     A tuple of the form (frequency index, sample index)
:returns:                   The ID of the front or -1 if not found in `front` and the item at `onsets_or_offsets[index]`
                            is not a 1.