def index_to_temporalID(index, snapnum, index_mult_factor):
    """
    Takes snapshot-local halo index and converts into temporally unique ID.

    Note: IDs start counting at 1.  So the index 0 gets mapped to an ID of 1.

    Parameters
    ----------

    index: array-like of integers, or integer.
        Array or single value that describes the snapshot-local haloID.

    snapnum: Integer.
        Snapshot that the halo/s are/is located at.

    index_mult_factor: Integer.
        Factor to convert a the snapshot-unique halo index to a temporally
        unique halo ID.

    Returns
    ----------
    
    index: array-like of integers, or integer.
        Array or single value that contains the temporally unique haloID.

    Examples
    ----------

    >>> index_to_temporalID(23, 18, 1e12)
    18000000000024
    """

    temporalID = snapnum*int(index_mult_factor) + index + 1

    return temporalID