def IsSubclass(candidate, parent_class):
  """Calls issubclass without raising an exception.

  Args:
    candidate: A candidate to check if a subclass.
    parent_class: A class or tuple of classes representing a potential parent.

  Returns:
    A boolean indicating whether or not candidate is a subclass of parent_class.
  """
  try:
    return issubclass(candidate, parent_class)
  except __HOLE__:
    return False
dataset/ETHPy150Open GoogleCloudPlatform/endpoints-proto-datastore/endpoints_proto_datastore/utils.py/IsSubclass