def FromDictionary(cls, dictionary):
    """Initializes from user specified dictionary.

    Args:
      dictionary: dict of user specified attributes
    Returns:
      GitkitUser object
    """
    if 'user_id' in dictionary:
      raise errors.GitkitClientError('use localId instead')
    if 'localId' not in dictionary:
      raise errors.GitkitClientError('must specify localId')
    if 'email' not in dictionary:
      raise errors.GitkitClientError('must specify email')

    return cls(decode=False, **dictionary)
Initializes from user specified dictionary.

    Args:
      dictionary: dict of user specified attributes
    Returns:
      GitkitUser object