(function_name, functions_mapping)
get function from functions_mapping,
        if not found, then try to check if builtin function.

    Args:
        variable_name (str): variable name
        variables_mapping (dict): variables mapping

    Returns:
        mapping function object.

    Raises:
        exceptions.FunctionNotFound: function is neither defined in debugtalk.py nor builtin.
get function from functions_mapping,
        if not found, then try to check if builtin function.
get function from functions_mapping if not found then try to check if builtin function .
def get_mapping_function(function_name, functions_mapping):
    """ get function from functions_mapping,
        if not found, then try to check if builtin function.

    Args:
        variable_name (str): variable name
        variables_mapping (dict): variables mapping

    Returns:
        mapping function object.

    Raises:
        exceptions.FunctionNotFound: function is neither defined in debugtalk.py nor builtin.

    """
    if function_name in functions_mapping:
        return functions_mapping[function_name]

    try:
        # check if HttpRunner builtin functions
        from . import loader
        built_in_functions = loader.load_builtin_functions()
        return built_in_functions[function_name]
    except KeyError:
        pass

    try:
        # check if Python builtin functions
        item_func = eval(function_name)
        if callable(item_func):
            # is builtin function
            return item_func
    except (NameError, TypeError):
        # is not builtin function
        raise exceptions.FunctionNotFound("{} is not found.".format(function_name))
def get_mapping_function ( function_name , functions_mapping ) : if function_name in functions_mapping : return functions_mapping [ function_name ] try : # check if HttpRunner builtin functions from . import loader built_in_functions = loader . load_builtin_functions ( ) return built_in_functions [ function_name ] except KeyError : pass try : # check if Python builtin functions item_func = eval ( function_name ) if callable ( item_func ) : # is builtin function return item_func except ( NameError , TypeError ) : # is not builtin function raise exceptions . FunctionNotFound ( "{} is not found." . format ( function_name ) )