code: def get_registered_adapter(
      cls: Union[str, type]
  ) -> Optional[AdapterRegistryInfo]:
      """
      Resolves a provided `cls` (whether str path to class, a registered base or an adapter class)
      to obtain the metadata for the adapter.
  
      Args:
          cls: Can be a str (absolute path to a class), a base class or an adapter class (which have already
              been registered).
  
      Returns:
          A AdapterRegistryInfo object if it could resolve successfully, otherwise None.
      """
      global ADAPTER_REGISTRY
      if isinstance(cls, str):
          cls = model_utils.import_class_by_path(cls)
  
      # If an adapter class was provided, de-reference its base class
      if hasattr(cls, "_meta_base_class"):
          cls = cls._meta_base_class
  
      class_path = f"{cls.__module__}.{cls.__name__}"
  
      # If base class, check registry
      if class_path in ADAPTER_REGISTRY:
          return ADAPTER_REGISTRY[class_path]
  
      return None
  
imports: import inspect
  from abc import ABC
  from dataclasses import dataclass, is_dataclass
  from typing import List, Optional, Set, Tuple, Union
  import torch
  import torch.nn
  from hydra.utils import instantiate
  from omegaconf import DictConfig, OmegaConf, open_dict
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 2 for calling a global function with example usage: get_registered_adapter(cls) and returns: None, ADAPTER_REGISTRY