class_docstr: Metaclass that implements the singleton pattern for a Python class.
docstr: Create an object if does not already exist, otherwise return what there is.
docstr_tok: ["Create","an","object","if","does","not","already","exist",",","otherwise","return","what","there","is","."]
code: def __call__(cls, *args, **kwargs):
      """Create an object if does not already exist, otherwise return what there is."""
      if cls.instance is None:
          try:
              cls.instance = super().__call__(*args, **kwargs)
          except TypeError as exception:
              raise SingletonNotInstantiatedError(
                  cls.__name__
              ) from exception
  
      elif args or kwargs:
          raise SingletonAlreadyInstantiatedError(cls.__name__)
  
      return cls.instance
  
imports: from __future__ import annotations
  from abc import ABCMeta
  from orion.core.utils import Factory, GenericFactory, T
label_desc: Use image node_id 2 for calling the SingletonType obj's underlying member method code with example usage: obj.__call__(cls) and returns: cls