code: def _parse_optional_params(self, oauth_params, req_kwargs):
          '''
          Parses and sets optional OAuth parameters on a request.
  
          :param oauth_param: The OAuth parameter to parse.
          :type oauth_param: str
          :param req_kwargs: The keyworded arguments passed to the request
              method.
          :type req_kwargs: dict
          '''
          params = req_kwargs.get('params', {})
          data = req_kwargs.get('data') or {}
  
          for oauth_param in OPTIONAL_OAUTH_PARAMS:
              if oauth_param in params:
                  oauth_params[oauth_param] = params.pop(oauth_param)
              if oauth_param in data:
                  oauth_params[oauth_param] = data.pop(oauth_param)
  
              if params:
                  req_kwargs['params'] = params
  
              if data:
                  req_kwargs['data'] = datf _parse_optional_params(self, oauth_params, req_kwargs):
          '''
          Parses and sets optional OAuth parameters on a request.
  
          :param oauth_param: The OAuth parameter to parse.
          :type oauth_param: str
          :param req_kwargs: The keyworded arguments passed to the request
              method.
          :type req_kwargs: dict
          '''
          params = req_kwargs.get('params', {})
          data = req_kwargs.get('data') or {}
  
          for oauth_param in OPTIONAL_OAUTH_PARAMS:
              if oauth_param in params:
                  oauth_params[oauth_param] = params.pop(oauth_param)
              if oauth_param in data:
                  oauth_params[oauth_param] = data.pop(oauth_param)
  
              if params:
                  req_kwargs['params'] = params
  
              if data:
                  req_kwargs['data'] = data
docs: Parses and sets optional OAuth parameters on a request.
  
          :param oauth_param: The OAuth parameter to parse.
          :type oauth_param: str
          :param req_kwargs: The keyworded arguments passed to the request
              method.
          :type req_kwargs: dict