code: def get_token_from_header(request):
      
      token = None
  
      if 'Authorization' in request.headers:
          split_header = request.headers.get('Authorization').split()
          if len(split_header) == 2 and split_header[0] == 'Bearer':
              token = split_header[1]
      else:
          token = request.access_token
  
      return token
docs: Helper function to extract a token from the request header.
  
      :param request: OAuthlib request.
      :type request: oauthlib.common.Request
      :return: Return the token or None if the Authorization header is malformed.