def _find_var_dictionary(table, dict_name=None, dict_type=None):
###############################################################################
    """Find and return a var_dictionary named, <dict_name> in <table>.
    If not found, return None"""
    var_dicts = table.find("var_dictionaries")
    target_dict = None
    if (dict_name is None) and (dict_type is None):
        raise ValueError(("At least one of <dict_name> or <dict_type> must "
                          "contain a string"))
    # end if
    for vdict in var_dicts:
        if (((dict_name is None) or (vdict.get("name") == dict_name)) and
            ((dict_type is None) or (vdict.get("type") == dict_type))):
            target_dict = vdict
            break
        # end if
    # end for
    return target_dict