def METHOD_NAME(self, client_info, client_metadata, request):
    client = Client(
        user_id=request.user_id,
        **client_info
    )
    client.set_client_metadata(client_metadata)
    db.session.add(client)
    db.session.commit()
    return client