def METHOD_NAME(cls, user):
    """
    Generates a new key/secret pair suitable for symmetric JWT signing.
    This method must be run within a db transaction.
    Returns an instance of APIKey.
    """
    key = cls.get_unique_key(f'user:{user.pk}:')
    return cls.objects.create(
        key=key,
        secret=cls.generate_secret(32),
        type=SYMMETRIC_JWT_TYPE,
        user=user,
        is_active=True,
    )