code: def get_correct_arti(self, apply_spec) -> T:
      for t in self.types:
          if (
              apply_spec.type_name is None
              or t.get_type().type_name == apply_spec.type_name
          ):
              return t(
                  name=self.name,
                  roles=self.roles,
                  stages=self.stages,
                  desc=self.desc,
                  multi=self.is_multi,
                  optional=self.optional,
              )
      raise ValueError(f"no artifact describe for {apply_spec}")
  
imports: import typing
  from typing import Dict, List, Type, Union
label_desc: Use image node_id 5 for calling the AllowArtifactDescribes obj's underlying member method code with example usage: obj.get_correct_arti(apply_spec) and returns: t