def METHOD_NAME(
    self,
    ak_array: ak.Array,
    field_name: str,
    n_events_in_file: int,
) -> pd.DataFrame:
    df = pd.DataFrame(ak.to_pandas(ak_array[field_name]))
    if len(df.columns) == 1:
        if df.columns == ["values"]:
            df.columns = [field_name]
    if "event_no" in df.columns:
        return df
    # If true, the dataframe contains more than 1 row pr. event (i.e.,
    # pulsemap).
    if len(df) != n_events_in_file:
        event_nos = []
        c = 0
        for event_no in range(
            self._event_counter, self._event_counter + n_events_in_file, 1
        ):
            try:
                event_nos.extend(
                    np.repeat(event_no, len(df[df.columns[0]][c])).tolist()
                )
            # KeyError indicates that this df has no entry for event_no
            # (e.g., an event with no detector response).
            except KeyError:
                pass
            c += 1
    else:
        event_nos = np.arange(0, n_events_in_file, 1) + self._event_counter
    df["event_no"] = event_nos
    return df