code: def get_client(client_id):
      
      client = Client.query.get(client_id)
      if client and client.user.active:
          return client
docs: Load the client.
  
      Needed for grant_type client_credentials.
  
      Add support for OAuth client_credentials access type, with user
      inactivation support.
  
      :param client_id: The client ID.
      :returns: The client instance or ``None``.