Finds a varable (local or global) somewhere in the stack and returns the value

    Args:
        varname (str): variable name

    Returns:
        None if varname is not found else its value

def search_stack_for_var(varname, verbose=util_arg.NOT_QUIET):
    """
    Finds a varable (local or global) somewhere in the stack and returns the value

    Args:
        varname (str): variable name

    Returns:
        None if varname is not found else its value
    """
    curr_frame = inspect.currentframe()
    if verbose:
        print(' * Searching parent frames for: ' + six.text_type(varname))
    frame_no = 0
    while curr_frame.f_back is not None:
        if varname in curr_frame.f_locals.keys():
            if verbose:
                print(' * Found local in frame: ' + six.text_type(frame_no))
            return curr_frame.f_locals[varname]
        if varname in curr_frame.f_globals.keys():
            if verbose:
                print(' * Found global in frame: ' + six.text_type(frame_no))
            return curr_frame.f_globals[varname]
        frame_no += 1
        curr_frame = curr_frame.f_back
    if verbose:
        print('... Found nothing in all ' + six.text_type(frame_no) + ' frames.')
    return None