class_docstr: The `User` class is used to manage users in Argilla. It provides methods to
  create new users, list all the users, get a user by its name or ID, and delete it.
  While it's not allowed to update the user information for the moment.
  
  Args:
      name: the name of the user to be managed. Defaults to None.
      id: the ID of the user to be managed. Defaults to None.
  
  Attributes:
      _client: the `httpx.Client` initialized to interact with the Argilla API.
      id: the ID of the user.
      username: the username of the user.
      first_name: the first name of the user.
      last_name: the last name of the user. Defaults to None.
      full_name: the full name of the user. Defaults to None.
      role: the role of the user.
      api_key: the API key of the user.
      inserted_at: the datetime when the user was created.
      updated_at: the datetime when the user was last updated.
  
  Examples:
      >>> from argilla import rg
      >>> user = rg.User.from_name("my-user") # or `User.from_id("...")`
      >>> print(user)
      User(id='...', username='my-user', role='annotator', first_name='Luke', last_name="Skywalker', full_name='Luke Skywalker', role='annotator', api_key='...', inserted_at=datetime.datetime(2021, 8, 31, 10, 0, 0), updated_at=datetime.datetime(2021, 8, 31, 10, 0, 0))
class_docstr_tok: ["The","`","User","`","class","is","used","to","manage","users","in","Argilla",".","It","provides","methods","to","create","new","users",",","list","all","the","users",",","get","a","user","by","its","name","or","ID",",","and","delete","it",".","While","it","'s","not","allowed","to","update","the","user","information","for","the","moment",".","Args",":","name",":","the","name","of","the","user","to","be","managed",".","Defaults","to","None",".","id",":","the","ID","of","the","user","to","be","managed",".","Defaults","to","None",".","Attributes",":","_client",":","the","`","httpx.Client","`","initialized","to","interact","with","the","Argilla","API",".","id",":","the","ID","of","the","user",".","username",":","the","username","of","the","user",".","first_name",":","the","first","name","of","the","user",".","last_name",":","the","last","name","of","the","user",".","Defaults","to","None",".","full_name",":","the","full","name","of","the","user",".","Defaults","to","None",".","role",":","the","role","of","the","user",".","api_key",":","the","API","key","of","the","user",".","inserted_at",":","the","datetime","when","the","user","was","created",".","updated_at",":","the","datetime","when","the","user","was","last","updated",".","Examples",":",">",">",">","from","argilla","import","rg",">",">",">","user","=","rg.User.from_name","(","``","my-user","''",")","#","or","`","User.from_id","(","``","...","''",")","`",">",">",">","print","(","user",")","User","(","id=","'","...","'",",","username='my-user","'",",","role='annotator","'",",","first_name='Luke","'",",","last_name=","''","Skywalker","'",",","full_name='Luke","Skywalker","'",",","role='annotator","'",",","api_key=","'","...","'",",","inserted_at=datetime.datetime","(","2021",",","8",",","31",",","10",",","0",",","0",")",",","updated_at=datetime.datetime","(","2021",",","8",",","31",",","10",",","0",",","0",")",")"]
docstr: Returns the active Argilla `httpx.Client` instance.
docstr_tok: ["Returns","the","active","Argilla","`","httpx.Client","`","instance","."]
code: def __active_client(
      httpx: bool = True,
  ) -> Union["httpx.Client", "AuthenticatedClient"]:
      """Returns the active Argilla `httpx.Client` instance."""
      try:
          client = active_client().http_client
          if httpx:
              client = client.httpx
          return client
      except Exception as e:
          raise RuntimeError(
              f"The `rg.active_client()` is not available or not responding."
          ) from e
  
imports: import warnings
  from datetime import datetime
  from typing import TYPE_CHECKING, Iterator, List, Optional, Union
  from uuid import UUID
  from argilla.client.sdk.commons.errors import AlreadyExistsApiError, BaseClientError, NotFoundApiError, ValidationApiError
  from argilla.client.sdk.users import api
  from argilla.client.sdk.users.models import UserModel, UserRole
  from argilla.client.sdk.v1.users import api
  from argilla.client.sdk.v1.workspaces import api
  from argilla.client.singleton import active_client
  from argilla.client.utils import allowed_for_roles
label_desc: Use image node_id 7 for calling the User obj's underlying member method code with example usage: obj.__active_client(httpx) and returns: client