code: def reconstruct_registry_entity(args, registry):
      """Reconstructs an entity from arguments generated from a registry"""
      possible_names = registry.list_registered()
      name = getattr(args, registry.flag_registry_name)
      if name is None:
          return None
  
      if name not in possible_names:
          raise TVMCException(
              f'{registry.flag_registry_name.title()} "{name}" is not defined'
          )
  
      reconstructed = {
          possible_name: _reconstruct_registry_options(
              args, registry, possible_name
          )
          for possible_name in possible_names
      }
  
      for possible_name in possible_names:
          if possible_name != name and reconstructed[possible_name]:
              first_option = list(reconstructed[possible_name])[0]
              raise TVMCException(
                  f"Passed --{registry.flag_registry_name}-{possible_name}-{first_option} "
                  f"but did not specify {possible_name} executor"
              )
  
      return registry(name, reconstructed[name])
  
imports: from tvm.driver.tvmc import TVMCException
label_desc: Use image node_id 4 for calling a global function with example usage: reconstruct_registry_entity(args, registry) and returns: registry, None