code: def has_self_cls_arg(func_or_method):
      """Checks if it is method which takes self/cls as the first argument."""
      if isinstance(func_or_method, staticmethod):
          return False
      if inspect.ismethod(func_or_method):
          return True
      if isinstance(func_or_method, classmethod):
          return True
      if six.PY2:
          arg_names = inspect.getargspec(func_or_method).args
      else:
          arg_names = list(inspect.signature(func_or_method).parameters)
      if arg_names and arg_names[0] in ("self", "cls"):
          return True
      return False
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import functools
  import inspect
  from absl import logging
  import numpy
  import six
  import tensorflow
  from tf_agents.utils import common
  from tensorflow.python.util import tf_decorator
label_desc: Use image node_id 1 for calling a global function with example usage: has_self_cls_arg(func_or_method) and returns: False, False, True, True, True