code: def is_instance(obj, modules, classnames):
      """
      Check if the given object is an instance of classname in module(s). Module
      can be None (i.e. not installed)
  
      Args:
          obj (obj): object to test
          modules (module or tuple[module]): module to check, can be also be None (will be ignored)
          classnames (str or tuple[str]): classname from module to check. If multiple values are
                                          provided, they should match with a single module in order.
                                          If a single value is provided, will be used for all modules.
      Returns:
          bool: True if object is an instance of classname from corresponding module, otherwise False.
                Also returns False if the module is None (i.e. module is not installed)
      """
      if type(modules) is not tuple:
          modules = (modules,)
      if type(classnames) is not tuple:
          classnames = (classnames,) * len(modules)
      if len(modules) != len(classnames):
          raise ValueError(
              "Number of modules does not match number of classnames"
          )
      to_check = tuple(
          getattr(mod, classname, mod)
          for mod, classname in zip(modules, classnames)
          if mod
      )
      return isinstance(obj, to_check)
  
file_path: featuretools/featuretools/utils/gen_utils.py
imports: import importlib
  import logging
  import re
  import sys
  from enum import Enum
  from tqdm import tqdm
label_desc: Use image node_id 6 for calling a global function with example usage: is_instance(obj, modules, classnames) and returns: isinstance