def METHOD_NAME(**enum_setting):
    # value from env
    function, source = [
        {"get_enum": get_enum, "board_xml": board_xml}[enum_setting[key]]
        for key in ['function', 'source']
    ]
    # value from given
    selector, name_selector, sorted_func, obj_type = [enum_setting[key] for key in ['selector', 'name-selector', 'sorted', 'type']]
    # get enum data
    enum = function(source, selector, name_selector, obj_type)
    if sorted_func:
        fn = eval(sorted_func)
        enum = sorted(enum, key=lambda x: fn(x[0]))
    return zip(*enum)