code: def is_base_registrable(cls) -> bool:
      """
      Checks whether this is a class that directly inherits from Registrable, or is a subclass of such
      a class.
      """
      from allennlp.common.registrable import (
          Registrable,
      )  # import here to avoid circular imports
  
      if not issubclass(cls, Registrable):
          return False
      method_resolution_order = inspect.getmro(cls)[1:]
      for base_class in method_resolution_order:
          if (
              issubclass(base_class, Registrable)
              and base_class is not Registrable
          ):
              return False
      return True
  
imports: import collections.abc
  from copy import deepcopy
  from pathlib import Path
  from typing import Any, Callable, cast, Dict, Iterable, List, Mapping, Set, Tuple, Type, TypeVar, Union, Optional
  import inspect
  import logging
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.lazy import Lazy
  from allennlp.common.params import Params
label_desc: Use image node_id 4 for calling a global function with example usage: is_base_registrable(cls) and returns: True, False, False