def return2DIndex(key, arr):
    """Returns the first index of a 2D array for the first
    occurence of the object/variable anywhere in the array.

    Parameters
    ----------
    key : :class:`any`
        Variable or object to find in the array.
    arr : :class:`list`
        2D array to search.

    Returns
    -------
    :class:`int`
        The first index where the key occurs
    """
    i = [i for i in arr if key in i][0]
    return arr.index(i)