code: def textx_isinstance(obj, obj_cls):
      
      if isinstance(obj, obj_cls):
          return True
      if hasattr(obj_cls, "_tx_fqn") and hasattr(obj, "_tx_fqn"):
          if obj_cls._tx_fqn == obj._tx_fqn:
              return True
      if hasattr(obj_cls, "_tx_inh_by"):
          for cls in obj_cls._tx_inh_by:
              if (textx_isinstance(obj, cls)):
                  return True
      return False
docs: This function determines, if a textx object is an instance of a
       textx class.
      Args:
          obj: the object to be analyzed
          obj_cls: the class to be checked
  
      Returns:
          True if obj is an instance of obj_cls.