def METHOD_NAME(self) -> Dict:
    """Dump the object into a dictionary with a specific key order.
    :return: The ordered dict
    :rtype: Dict
    """
    order_keys = [
        "$schema",
        "name",
        "version",
        "display_name",
        "description",
        "tags",
        "type",
        "inputs",
        "outputs",
        "command",
        "environment",
        "code",
        "resources",
        "limits",
        "schedule",
        "jobs",
    ]
    nested_keys = ["component", "trial"]
    def _sort_dict_according_to_list(order_keys, dict_value):
        for nested_key in nested_keys:
            if nested_key in dict_value and isinstance(dict_value[nested_key], dict):
                dict_value[nested_key] = _sort_dict_according_to_list(order_keys, dict_value[nested_key])
        if "jobs" in dict_value:
            for node_name, node in dict_value["jobs"].items():
                dict_value["jobs"][node_name] = _sort_dict_according_to_list(order_keys, node)
        difference = list(set(dict_value.keys()).difference(set(order_keys)))
        # keys not in order_keys will be put at the end of the list in the order of alphabetic
        order_keys.extend(sorted(difference))
        return dict(
            sorted(
                dict_value.items(),
                key=lambda dict_value_: order_keys.index(dict_value_[0]),
            )
        )
    return _sort_dict_according_to_list(order_keys, self._to_dict())