def GetObjectMetadata(self, bucket_name, object_name, generation=None,
                        provider=None, fields=None):
    """See CloudApi class for function doc strings."""
    if generation:
      generation = long(generation)
    if bucket_name in self.buckets:
      bucket = self.buckets[bucket_name]
      if object_name in bucket.objects and bucket.objects[object_name]:
        if generation:
          if 'versioned' in bucket.objects[object_name]:
            for obj in bucket.objects[object_name]['versioned']:
              if obj.root_object.generation == generation:
                return obj.root_object
          if bucket.objects[object_name] in 'live':
            if (bucket.objects[object_name]['live'].root_object.generation ==
                generation):
              return bucket.objects[object_name]['live'].root_object
        else:
          # Return live object.
          if 'live' in bucket.objects[object_name]:
            return bucket.objects[object_name]['live'].root_object
      raise CreateObjectNotFoundException(404, self.provider, bucket_name,
                                          object_name)
    raise CreateBucketNotFoundException(404, self.provider, bucket_name)
dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/tests/mock_cloud_api.py/MockCloudApi.GetObjectMetadata/swapped operands of `in`