<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ui_func(cls, id_, name, function_type, avail_fn=always):
 """Define a function representing a ui action."""

    return cls(id_, name, 0, 0, function_type, FUNCTION_TYPES[function_type],
               avail_fn)