  def CreateBucket(
      self,
      bucket: str,
      labels: Optional[Dict[str, str]] = None,
      predefined_acl: str = 'private',
      predefined_default_object_acl: str = 'private') -> Dict[str, Any]:
    """Creates a Google Cloud Storage bucket in the current project.

    Args:
      bucket (str): Name of the desired bucket.
      labels (Dict[str, str]): Mapping of key/value strings to be applied as a label
        to the bucket.
        Rules for acceptable label values are located at
        https://cloud.google.com/storage/docs/key-terms#bucket-labels
      predefined_acl (str): A predefined set of Access Controls
        to apply to the bucket.
      predefined_default_object_acl (str): A predefined set of Access Controls
        to apply to the objects in the bucket.
      Values listed in https://cloud.google.com/storage/docs/json_api/v1/buckets/insert#parameters  # pylint: disable=line-too-long

    Returns:
      Dict[str, Any]: An API operation object for a Google Cloud Storage bucket.
           https://cloud.google.com/storage/docs/json_api/v1/buckets#resource

    Raises:
      ResourceCreationError: If the resource could not be created.
    """
    if bucket.startswith('gs://'):
      bucket = bucket[5:]
    gcs_buckets = self.GcsApi().buckets() # pylint: disable=no-member
    body = {'name': bucket, 'labels': labels}
    request = gcs_buckets.insert(
        project=self.project_id,
        predefinedAcl=predefined_acl,
        predefinedDefaultObjectAcl=predefined_default_object_acl,
        body=body)
    try:
      response = request.execute()  # type: Dict[str, Any]
    except HttpError as exception:
      if exception.resp.status == 409:
        raise errors.ResourceCreationError(
            'Bucket {0:s} already exists: {1!s}'.format(bucket, exception),
            __name__) from exception
      raise errors.ResourceCreationError(
          'Unknown error occurred when creating bucket:'
          ' {0!s}'.format(exception), __name__) from exception
    return response
Creates a Google Cloud Storage bucket in the current project.

Args:
bucket (str): Name of the desired bucket.
labels (Dict[str, str]): Mapping of key/value strings to be applied as a label
to the bucket.
Rules for acceptable label values are located at
https://cloud.google.com/storage/docs/key-terms#bucket-labels
predefined_acl (str): A predefined set of Access Controls
to apply to the bucket.
predefined_default_object_acl (str): A predefined set of Access Controls
to apply to the objects in the bucket.
Values listed in https://cloud.google.com/storage/docs/json_api/v1/buckets/insert#parameters  # pylint: disable=line-too-long

Returns:
Dict[str, Any]: An API operation object for a Google Cloud Storage bucket.
https://cloud.google.com/storage/docs/json_api/v1/buckets#resource

Raises:
ResourceCreationError: If the resource could not be created.
libcloudforensics/providers/gcp/internal/storage.py