code: def iter_pulls(self, state=None, head=None, base=None, sort='created',
                     direction='desc', number=-1, etag=None):
          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)