import inspect


def _iscallable(obj):
  """Check if an object is a callable object safe for inspect.find_file."""
  return inspect.ismodule(obj) or inspect.isclass(obj) or inspect.ismethod(
      obj) or inspect.isfunction(obj) or inspect.iscode(obj)