original_docstring: 
      ENTITY_TYPE: Entity type for the given ID. This can be a Service,
      Directory, or Organization.
  
      ENTITY_ID: Entity ID in the form of a UUID for the given Service,
      Directory, or Organization.
  
      PRIVATE_KEY: Path to private key belonging to the given entity ID.
      IE: /path/to/my.key
      
docstring: Entity type for the given ID. This can be a Service,
  Directory, or Organization.
  
  Entity ID in the form of a UUID for the given Service,
  Directory, or Organization.
  
  Path to private key belonging to the given entity ID.
docstring_tokens: Entity type for the given ID . This can be a Service Directory or Organization . Entity ID in the form of a UUID for the given Service Directory or Organization . Path to private key belonging to the given entity ID .
code: def main(ctx, entity_type, entity_id, private_key, api):
      """
      ENTITY_TYPE: Entity type for the given ID. This can be a Service,
      Directory, or Organization.
  
      ENTITY_ID: Entity ID in the form of a UUID for the given Service,
      Directory, or Organization.
  
      PRIVATE_KEY: Path to private key belonging to the given entity ID.
      IE: /path/to/my.key
      """
  
      # ensure that ctx.obj exists and is a dict (in case `cli()` is called
      # by means other than the `if` block below
      ctx.ensure_object(dict)
  
      entity_type = entity_type.lower()
      private_key = private_key.read()
      if entity_type == "organization":
          ctx.obj['factory'] = OrganizationFactory(entity_id, private_key,
                                                   url=api)
      elif entity_type == "directory":
          ctx.obj['factory'] = DirectoryFactory(entity_id, private_key, url=api)
      elif entity_type == "service":
          ctx.obj['factory'] = ServiceFactory(entity_id, private_key, url=api)
      else:
          raise TypeError("Input entity type is not valid. Should be one of: "
                          "Organization, Directory, Service.")
code_tokens: def main ( ctx , entity_type , entity_id , private_key , api ) : ctx . ensure_object ( dict ) entity_type = entity_type . lower ( ) private_key = private_key . read ( ) if entity_type == "organization" : ctx . obj [ 'factory' ] = OrganizationFactory ( entity_id , private_key , url = api ) elif entity_type == "directory" : ctx . obj [ 'factory' ] = DirectoryFactory ( entity_id , private_key , url = api ) elif entity_type == "service" : ctx . obj [ 'factory' ] = ServiceFactory ( entity_id , private_key , url = api ) else : raise TypeError ( "Input entity type is not valid. Should be one of: " "Organization, Directory, Service." )
short_docstring: ENTITY_TYPE: Entity type for the given ID.
short_docstring_tokens: ENTITY_TYPE : Entity type for the given ID .
comment: """
      ENTITY_TYPE: Entity type for the given ID. This can be a Service,
      Directory, or Organization.
  
      ENTITY_ID: Entity ID in the form of a UUID for the given Service,
      Directory, or Organization.
  
      PRIVATE_KEY: Path to private key belonging to the given entity ID.
      IE: /path/to/my.key
      """$SEP$# ensure that ctx.obj exists and is a dict (in case `cli()` is called$SEP$# by means other than the `if` block below