def name_in_frame(var, frame):
    """
    Looks at the locals of the frame and searches in it for var.
    :param var: variable to get name from.
    :param frame: a inspect frame
    :return: list with strings.
    """
    callers_local_vars = frame.f_locals.items()
    return [var_name for var_name, var_val in callers_local_vars if var_val is var]