original_docstring:  Add an account with the given account name and type.
  
      :param account: the name of the new account.
      :param type: the type of the new account.
      :param email: The Email address associated with the account.
      :param session: the database session in use.
      
docstring: Add an account with the given account name and type.
docstring_tokens: Add an account with the given account name and type .
code: def add_account(account, type, email, session=None):
      """ Add an account with the given account name and type.
  
      :param account: the name of the new account.
      :param type: the type of the new account.
      :param email: The Email address associated with the account.
      :param session: the database session in use.
      """
  
      if not vo_exists(vo=account.vo, session=session):
          raise exception.RucioException('VO {} not found'.format(account.vo))
  
      new_account = models.Account(account=account, account_type=type, email=email,
                                   status=AccountStatus.ACTIVE)
      try:
          new_account.save(session=session)
      except IntegrityError:
          raise exception.Duplicate('Account ID \'%s\' already exists!' % account)
      # Create the account counters for this account
      rucio.core.account_counter.create_counters_for_new_account(account=account, session=session)
code_tokens: def add_account ( account , type , email , session = None ) : if not vo_exists ( vo = account . vo , session = session ) : raise exception . RucioException ( 'VO {} not found' . format ( account . vo ) ) new_account = models . Account ( account = account , account_type = type , email = email , status = AccountStatus . ACTIVE ) try : new_account . save ( session = session ) except IntegrityError : raise exception . Duplicate ( 'Account ID \'%s\' already exists!' % account ) rucio . core . account_counter . create_counters_for_new_account ( account = account , session = session )
short_docstring: Add an account with the given account name and type.
short_docstring_tokens: Add an account with the given account name and type .
comment: """ Add an account with the given account name and type.
  
      :param account: the name of the new account.
      :param type: the type of the new account.
      :param email: The Email address associated with the account.
      :param session: the database session in use.
      """$SEP$# Create the account counters for this account