code: def extracts(
              self,
              page: 'WikipediaPage',
              **kwargs
      ) -> str:
          
          params = {
              'action': 'query',
              'prop': 'extracts',
              'titles': page.title
          }  # type: Dict[str, Any]
  
          if self.extract_format == ExtractFormat.HTML:
              # we do nothing, when format is HTML
              pass
          elif self.extract_format == ExtractFormat.WIKI:
              params['explaintext'] = 1
              params['exsectionformat'] = 'wiki'
          # elif self.extract_format == ExtractFormat.PLAIN:
          #    params['explaintext'] = 1
          #    params['exsectionformat'] = 'plain'
  
          used_params = kwargs
          used_params.update(params)
  
          raw = self._query(
              page,
              used_params
          )
          self._common_attributes(raw['query'], page)
          pages = raw['query']['pages']
          for k, v in pages.items():
              if k == '-1':
                  page._attributes['pageid'] = -1
                  return ''
              else:
                  return self._build_extracts(v, page)
          return ''
docs: Returns summary of the page with respect to parameters
  
          Parameter `exsectionformat` is taken from `Wikipedia` constructor.
  
          API Calls for parameters:
  
          - https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bextracts
          - https://www.mediawiki.org/wiki/Extension:TextExtracts#API
  
          Example::
  
              import wikipediaapi
              wiki = wikipediaapi.Wikipedia('en')
  
              page = wiki.page('Python_(programming_language)')
              print(wiki.extracts(page, exsentences=1))
              print(wiki.extracts(page, exsentences=2))
  
          :param page: :class:`WikipediaPage`
          :param kwargs: parameters used in API call
          :return: summary of the page