@memoize<EOL>def create_function_from_request_pdu(pdu):
function_code = get_function_code_from_request_pdu(pdu)<EOL>try:<EOL><INDENT>function_class = function_code_to_function_map[function_code]<EOL><DEDENT>except KeyError:<EOL><INDENT>raise IllegalFunctionError(function_code)<EOL><DEDENT>return function_class.create_from_request_pdu(pdu)<EOL>
Return function instance, based on request PDU.

    :param pdu: Array of bytes.
    :return: Instance of a function.