def global_maximum(enes_lst, include_endpts=False):
    """ Find the global maxima.
    """

    if include_endpts:
        max_ene = max(enes_lst)
    else:
        max_ene = max(enes_lst[1:-1])

    return enes_lst.index(max_ene)