code: def create_hf_dataset_repo(
      hf_api: HfApi,
      hf_token: str,
      prefix: str,
      *,
      private: bool = False,
      gated: Optional[str] = None,
      user: str = CI_HUB_USER,
  ) -> str:
      repo_id = create_unique_repo_name(prefix, user)
      hf_api.create_repo(
          repo_id=repo_id,
          token=hf_token,
          repo_type="dataset",
          private=private,
      )
      if gated:
          update_repo_settings(
              hf_api,
              repo_id,
              token=hf_token,
              gated=gated,
              repo_type="dataset",
          )
      return repo_id
  
imports: import time
  from collections.abc import Callable, Iterator
  from contextlib import contextmanager, suppress
  from typing import Any, Literal, Optional, TypedDict, Union
  import pytest
  import requests
  from huggingface_hub.constants import REPO_TYPES, REPO_TYPES_URL_PREFIXES
  from huggingface_hub.hf_api import HfApi
  from huggingface_hub.utils._errors import hf_raise_for_status
label_desc: Use image node_id 8 for calling a global function with example usage: create_hf_dataset_repo(hf_api, hf_token, prefix) and returns: repo_id