code: def _check_mtype(x):
      if isinstance(x, str):
          return "str"
      elif isinstance(x, dict):
          return "dict"
      elif inspect.isclass(x):
          return "class"
      elif isinstance(x, type(None)):
          return "None"
      else:
          try:
              if inspect.isclass(type(x)):
                  return "class_instance"
          except:
              raise TypeError(
                  "Parameter must of type string, dict, class, or"
                  " class instance."
              )
  
file_path: hypertools/hypertools/tools/text2mat.py
imports: import numpy
  import inspect
  from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
  from sklearn.decomposition import LatentDirichletAllocation, NMF
  from sklearn.utils.validation import check_is_fitted
  from sklearn.exceptions import NotFittedError
  from sklearn.pipeline import Pipeline
  from .._shared.helpers import memoize
  from .._shared.params import default_params
  from .load import load
label_desc: Use image node_id 4 for calling a global function with example usage: _check_mtype(x) and returns: str, str, str, str, str