def _CheckTestHarnessImageEntityAndApiMessageEqual(entity, message):
  """A helper method to check equility.

  Args:
    entity: an instance of datastore_entities.TestHarnessImageMetadata.
    message: an instance of api_messages.TestHarnessImageMetadataMessage.

  Returns:
    A bool, whether the entity and message are considered equal.
  """
  return (entity.repo_name == message.repo_name and
          entity.digest == message.digest and
          entity.test_harness == message.test_harness and
          entity.test_harness_version == message.test_harness_version and
          entity.current_tags == message.tags and
          entity.create_time == message.create_time)