def METHOD_NAME(email=None):
    """Build an acme.Client and register a new account with a random key."""
    client = uninitialized_client()
    tos = client.directory.meta.terms_of_service
    if tos == ACCEPTABLE_TOS:
        client.net.account = client.new_account(messages.NewRegistration.from_data(email=email,
            terms_of_service_agreed=True))
    else:
        raise Exception("Unrecognized terms of service URL %s" % tos)
    return client