nodes: 0, module; 1, function_definition; 2, function_name:iter_pulls; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, expression_statement; 14, expression_statement; 15, expression_statement; 16, if_statement; 17, expression_statement; 18, expression_statement; 19, return_statement; 20, identifier:state; 21, None; 22, identifier:head; 23, None; 24, identifier:base; 25, None; 26, identifier:sort; 27, string; 28, identifier:direction; 29, string; 30, identifier:number; 31, unary_operator; 32, identifier:etag; 33, None; 34, comment:"""List pull requests on repository.
  
          .. versionchanged:: 0.9.0
  
              - The ``state`` parameter now accepts 'all' in addition to 'open'
                and 'closed'.
  
              - The ``sort`` parameter was added.
  
              - The ``direction`` parameter was added.
  
          :param str state: (optional), accepted values: ('all', 'open',
              'closed')
          :param str head: (optional), filters pulls by head user and branch
              name in the format ``user:ref-name``, e.g., ``seveas:debian``
          :param str base: (optional), filter pulls by base branch name.
              Example: ``develop``.
          :param str sort: (optional), Sort pull requests by ``created``,
              ``updated``, ``popularity``, ``long-running``. Default: 'created'
          :param str direction: (optional), Choose the direction to list pull
              requests. Accepted values: ('desc', 'asc'). Default: 'desc'
          :param int number: (optional), number of pulls to return. Default: -1
              returns all available pull requests
          :param str etag: (optional), ETag from a previous request to the same
              endpoint
          :returns: generator of
              :class:`PullRequest <github3.pulls.PullRequest>`\ s
          """; 35, assignment; 36, assignment; 37, boolean_operator; 38, block; 39, call; 40, call; 41, call; 42, string_content:created; 43, string_content:desc; 44, integer:1; 45, identifier:url; 46, call; 47, identifier:params; 48, dictionary; 49, identifier:state; 50, comparison_operator:state.lower() in ('all', 'open', 'closed'); 51, expression_statement; 52, attribute; 53, argument_list; 54, attribute; 55, argument_list; 56, attribute; 57, argument_list; 58, attribute; 59, argument_list; 60, call; 61, tuple; 62, assignment; 63, identifier:params; 64, identifier:update; 65, keyword_argument; 66, keyword_argument; 67, keyword_argument; 68, keyword_argument; 69, identifier:self; 70, identifier:_remove_none; 71, identifier:params; 72, identifier:self; 73, identifier:_iter; 74, call; 75, identifier:url; 76, identifier:PullRequest; 77, identifier:params; 78, identifier:etag; 79, identifier:self; 80, identifier:_build_url; 81, string; 82, keyword_argument; 83, attribute; 84, argument_list; 85, string; 86, string; 87, string; 88, subscript; 89, call; 90, identifier:head; 91, identifier:head; 92, identifier:base; 93, identifier:base; 94, identifier:sort; 95, identifier:sort; 96, identifier:direction; 97, identifier:direction; 98, identifier:int; 99, argument_list; 100, string_content:pulls; 101, identifier:base_url; 102, attribute; 103, identifier:state; 104, identifier:lower; 105, string_content:all; 106, string_content:open; 107, string_content:closed; 108, identifier:params; 109, string; 110, attribute; 111, argument_list; 112, identifier:number; 113, identifier:self; 114, identifier:_api; 115, string_content:state; 116, identifier:state; 117, identifier:lower
code: def iter_pulls(self, state=None, head=None, base=None, sort='created',
                     direction='desc', number=-1, etag=None):
          """List pull requests on repository.
  
          .. versionchanged:: 0.9.0
  
              - The ``state`` parameter now accepts 'all' in addition to 'open'
                and 'closed'.
  
              - The ``sort`` parameter was added.
  
              - The ``direction`` parameter was added.
  
          :param str state: (optional), accepted values: ('all', 'open',
              'closed')
          :param str head: (optional), filters pulls by head user and branch
              name in the format ``user:ref-name``, e.g., ``seveas:debian``
          :param str base: (optional), filter pulls by base branch name.
              Example: ``develop``.
          :param str sort: (optional), Sort pull requests by ``created``,
              ``updated``, ``popularity``, ``long-running``. Default: 'created'
          :param str direction: (optional), Choose the direction to list pull
              requests. Accepted values: ('desc', 'asc'). Default: 'desc'
          :param int number: (optional), number of pulls to return. Default: -1
              returns all available pull requests
          :param str etag: (optional), ETag from a previous request to the same
              endpoint
          :returns: generator of
              :class:`PullRequest <github3.pulls.PullRequest>`\ s
          """
          url = self._build_url('pulls', base_url=self._api)
          params = {}
          if state and state.lower() in ('all', 'open', 'closed'):
              params['state'] = state.lower()
          params.update(head=head, base=base, sort=sort, direction=direction)
          self._remove_none(params)
          return self._iter(int(number), url, PullRequest, params, etag)