code: def get_handler(self, grant_type):
          
          if grant_type == 'authorization_code':
              return self.authorization_code
          elif grant_type == 'refresh_token':
              return self.refresh_token
          elif grant_type == 'password':
              return self.password
          return None
docs: Return a function or method that is capable handling the ``grant_type``
          requested by the client or return ``None`` to indicate that this type
          of grant type is not supported, resulting in an error response.