class_docstr: A unique ID for every Syft object.
  
  This object creates a unique ID for every object in the Syft
  ecosystem. This ID is guaranteed to be unique for the node on
  which it is initialized and is very likely to be unique across
  the whole ecosystem (because it is long and randomly generated).
  
  Nearly all objects within Syft subclass from this object because
  nearly all objects need to have a unique ID. The only major
  exception a the time of writing is the Client object because it
  just points to another object which itself has an id.
  
  There is no other way in Syft to create an ID for any object.
class_docstr_tok: ["A","unique","ID","for","every","Syft","object",".","This","object","creates","a","unique","ID","for","every","object","in","the","Syft","ecosystem",".","This","ID","is","guaranteed","to","be","unique","for","the","node","on","which","it","is","initialized","and","is","very","likely","to","be","unique","across","the","whole","ecosystem","(","because","it","is","long","and","randomly","generated",")",".","Nearly","all","objects","within","Syft","subclass","from","this","object","because","nearly","all","objects","need","to","have","a","unique","ID",".","The","only","major","exception","a","the","time","of","writing","is","the","Client","object","because","it","just","points","to","another","object","which","itself","has","an","id",".","There","is","no","other","way","in","Syft","to","create","an","ID","for","any","object","."]
docstr: Initializes the internal id using the uuid package.
  
  This initializes the object. Normal use for this object is
  to initialize the constructor with value==None because you
  want to initialize with a novel ID. The only major exception
  is deserialization, wherein a UID object is created with a
  specific id value.
  
  :param value: if you want to initialize an object with a specific UID, pass it
                in here. This is normally only used during deserialization.
  :type value: uuid.uuid4, optional
  :return: returns the initialized object
  :rtype: UID
  
  .. code-block:: python
  
      from syft.types.uid import UID
      my_id = UID()
docstr_tok: ["Initializes","the","internal","id","using","the","uuid","package",".","This","initializes","the","object",".","Normal","use","for","this","object","is","to","initialize","the","constructor","with","value==None","because","you","want","to","initialize","with","a","novel","ID",".","The","only","major","exception","is","deserialization",",","wherein","a","UID","object","is","created","with","a","specific","id","value",".",":","param","value",":","if","you","want","to","initialize","an","object","with","a","specific","UID",",","pass","it","in","here",".","This","is","normally","only","used","during","deserialization",".",":","type","value",":","uuid.uuid4",",","optional",":","return",":","returns","the","initialized","object",":","rtype",":","UID","..","code-block",":",":","python","from","syft.types.uid","import","UID","my_id","=","UID","(",")"]
code: def __init__(
      self, value: Optional[Union[uuid_type, str, bytes]] = None
  ):
      """Initializes the internal id using the uuid package.
  
      This initializes the object. Normal use for this object is
      to initialize the constructor with value==None because you
      want to initialize with a novel ID. The only major exception
      is deserialization, wherein a UID object is created with a
      specific id value.
  
      :param value: if you want to initialize an object with a specific UID, pass it
                    in here. This is normally only used during deserialization.
      :type value: uuid.uuid4, optional
      :return: returns the initialized object
      :rtype: UID
  
      .. code-block:: python
  
          from syft.types.uid import UID
          my_id = UID()
      """
      # checks to make sure you've set a proto_type
      super().__init__()
  
      # if value is not set - create a novel and unique ID.
      if isinstance(value, str):
          value = uuid.UUID(value)
      elif isinstance(value, bytes):
          value = uuid.UUID(bytes=value)
      elif isinstance(value, UID):
          value = value.value
  
      self.value = uuid.uuid4() if value is None else value
  
imports: from typing import Any
  from typing import Callable
  from typing import Dict
  from typing import Optional
  from typing import Sequence
  from typing import Union
  import uuid
  from uuid import UUID
  from ..serde.serializable import serializable
  from ..util.logger import critical
  from ..util.logger import traceback_and_raise
label_desc: Use image node_id 1 to create a new UID object  with example: obj = UID(value)