code: def _get_output_models(task):
      # type: ("clearml.Task") -> ModelsList # noqa: F821
  
      res = task.send(
          models.GetAllRequest(
              task=[task.id], order_by=["created"], only_fields=["id"]
          )
      )
      ids = [m.id for m in res.response.models or []] + list(
          task.output_models_id.values()
      )
      # remove duplicates and preserve order
      ids = list(OrderedDict.fromkeys(ids))
  
      id_to_name = (
          {x.model: x.name for x in task.data.models.output}
          if Session.check_min_api_version("2.13")
          else {}
      )
  
      def resolve_name(index, model_id):
          return id_to_name.get(
              model_id, "Output Model #{}".format(index)
          )
  
      from clearml.model import Model
  
      output_models = OrderedDict(
          (resolve_name(i, m_id), Model(model_id=m_id))
          for i, m_id in enumerate(ids)
      )
  
      return ModelsList(output_models)
  
file_path: clearml/clearml/backend_interface/task/models.py
imports: import re
  import typing
  from collections import OrderedDict
  from clearml.backend_api import Session
  from clearml.backend_api.services import models
label_desc: Use image node_id 5 for calling the TaskModels obj's underlying member method code with example usage: obj._get_output_models(task) and returns: ModelsList, id_to_name