def __init__(
        self,
        api_url: Optional[str] = None,
        api_key: Optional[str] = None,
        workspace: Optional[str] = None,
        timeout: int = 120,
        extra_headers: Optional[Dict[str, str]] = None,
        httpx_extra_kwargs: Optional[Dict[str, Any]] = None,
    ):
        """
        Inits `Argilla` instance.

        If called with `api_url=None` and `api_key=None` and no values have been set for the environment variables
        `ARGILLA_API_URL` and `ARGILLA_API_KEY`, then the local credentials stored by a previous call to `argilla login`
        command will be used. If local credentials are not found, then `api_url` and `api_key` will fallback to the
        default values.

        Args:
            api_url: Address of the REST API. If `None` (default) and the env variable ``ARGILLA_API_URL`` is not set,
                it will default to `http://localhost:6900`.
            api_key: Authentication key for the REST API. If `None` (default) and the env variable ``ARGILLA_API_KEY``
                is not set, it will default to `argilla.apikey`.
            workspace: The workspace to which records will be logged/loaded. If `None` (default) and the
                env variable ``ARGILLA_WORKSPACE`` is not set, it will default to the private user workspace.
            timeout: Wait `timeout` seconds for the connection to timeout. Default: 60.
            extra_headers: Extra HTTP headers sent to the server. You can use this to customize
                the headers of argilla client requests, like additional security restrictions. Default: `None`.
            httpx_extra_kwargs: Extra kwargs passed to the `httpx.Client` constructor. For more information about the
                available arguments, see https://www.python-httpx.org/api/#client. Defaults to `None`.
        """
        from argilla_v1.client.login import ArgillaCredentials

        api_url = api_url or os.getenv("ARGILLA_API_URL")
        api_key = api_key or os.getenv("ARGILLA_API_KEY")
        workspace = workspace or os.getenv("ARGILLA_WORKSPACE")
        extra_headers = extra_headers or {}

        if api_url is None and api_key is None:
            try:
                credentials = ArgillaCredentials.load()
                api_url = credentials.api_url
                api_key = credentials.api_key
                if not workspace:
                    workspace = credentials.workspace
                extra_headers = credentials.extra_headers
            except FileNotFoundError:
                pass

        api_url = api_url or DEFAULT_API_URL
        api_key = api_key or DEFAULT_API_KEY

        # Checking that the api_url does not end in '/'
        api_url = re.sub(r"\/$", "", api_url)
        headers = extra_headers or {}

        self._client: AuthenticatedClient = AuthenticatedClient(
            base_url=api_url,
            token=api_key,
            timeout=timeout,
            headers=headers.copy(),
            httpx_extra_kwargs=httpx_extra_kwargs,
        )

        self._user = users_api.whoami(client=self.http_client)  # .parsed

        if not workspace and self._user.username == DEFAULT_USERNAME and DEFAULT_USERNAME in self._user.workspaces:
            warnings.warn(
                "Default user was detected and no workspace configuration was provided,"
                f" so the default {DEFAULT_USERNAME!r} workspace will be used. If you"
                " want to setup another workspace, use the `rg.set_workspace` function"
                " or provide a different one on `rg.init`",
                category=UserWarning,
            )
            workspace = DEFAULT_USERNAME
        if workspace:
            self.set_workspace(workspace or self._user.username)
        else:
            warnings.warn(
                "No workspace configuration was detected. To work with Argilla"
                " datasets, specify a valid workspace name on `rg.init` or set it"
                " up through the `rg.set_workspace` function.",
                category=UserWarning,
            )

        self._check_argilla_versions()

        Inits `Argilla` instance.

        If called with `api_url=None` and `api_key=None` and no values have been set for the environment variables
        `ARGILLA_API_URL` and `ARGILLA_API_KEY`, then the local credentials stored by a previous call to `argilla login`
        command will be used. If local credentials are not found, then `api_url` and `api_key` will fallback to the
        default values.

        Args:
            api_url: Address of the REST API. If `None` (default) and the env variable ``ARGILLA_API_URL`` is not set,
                it will default to `http://localhost:6900`.
            api_key: Authentication key for the REST API. If `None` (default) and the env variable ``ARGILLA_API_KEY``
                is not set, it will default to `argilla.apikey`.
            workspace: The workspace to which records will be logged/loaded. If `None` (default) and the
                env variable ``ARGILLA_WORKSPACE`` is not set, it will default to the private user workspace.
            timeout: Wait `timeout` seconds for the connection to timeout. Default: 60.
            extra_headers: Extra HTTP headers sent to the server. You can use this to customize
                the headers of argilla client requests, like additional security restrictions. Default: `None`.
            httpx_extra_kwargs: Extra kwargs passed to the `httpx.Client` constructor. For more information about the
                available arguments, see https://www.python-httpx.org/api/#client. Defaults to `None`.
        
argilla-v1/src/argilla_v1/client/client.py