def _getDct(dct, frame):
    """
    Gets the dictionary for the frame.

    Parameters
    ----------
    dct: dictionary to use if non-None
    frame: stack frame

    Returns
    -------
    dict
    """
    if dct is None:
        #dct = frame.f_back.f_locals
        dct = frame.f_back.f_globals
    return dct