nodes: 0, module; 1, function_definition; 2, function_name:search_code; 3, parameters; 4, block; 5, identifier:self; 6, identifier:query; 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, if_statement; 18, if_statement; 19, expression_statement; 20, return_statement; 21, identifier:sort; 22, None; 23, identifier:order; 24, None; 25, identifier:per_page; 26, None; 27, identifier:text_match; 28, False; 29, identifier:number; 30, unary_operator; 31, identifier:etag; 32, None; 33, comment:"""Find code via the code search API.
  
          The query can contain any combination of the following supported
          qualifiers:
  
          - ``in`` Qualifies which fields are searched. With this qualifier you
            can restrict the search to just the file contents, the file path, or
            both.
          - ``language`` Searches code based on the language it’s written in.
          - ``fork`` Specifies that code from forked repositories should be
            searched.  Repository forks will not be searchable unless the fork
            has more stars than the parent repository.
          - ``size`` Finds files that match a certain size (in bytes).
          - ``path`` Specifies the path that the resulting file must be at.
          - ``extension`` Matches files with a certain extension.
          - ``user`` or ``repo`` Limits searches to a specific user or
            repository.
  
          For more information about these qualifiers, see: http://git.io/-DvAuA
  
          :param str query: (required), a valid query as described above, e.g.,
              ``addClass in:file language:js repo:jquery/jquery``
          :param str sort: (optional), how the results should be sorted;
              option(s): ``indexed``; default: best match
          :param str order: (optional), the direction of the sorted results,
              options: ``asc``, ``desc``; default: ``desc``
          :param int per_page: (optional)
          :param bool text_match: (optional), if True, return matching search
              terms. See http://git.io/iRmJxg for more information
          :param int number: (optional), number of repositories to return.
              Default: -1, returns all available repositories
          :param str etag: (optional), previous ETag header value
          :return: generator of :class:`CodeSearchResult
              <github3.search.CodeSearchResult>`
          """; 34, assignment; 35, assignment; 36, comparison_operator:sort == 'indexed'; 37, block; 38, boolean_operator; 39, block; 40, identifier:text_match; 41, block; 42, assignment; 43, call; 44, integer:1; 45, identifier:params; 46, dictionary; 47, identifier:headers; 48, dictionary; 49, identifier:sort; 50, string; 51, expression_statement; 52, identifier:sort; 53, comparison_operator:order in ('asc', 'desc'); 54, expression_statement; 55, expression_statement; 56, identifier:url; 57, call; 58, identifier:SearchIterator; 59, argument_list; 60, pair; 61, string_content:indexed; 62, assignment; 63, identifier:order; 64, tuple; 65, assignment; 66, assignment; 67, attribute; 68, argument_list; 69, identifier:number; 70, identifier:url; 71, identifier:CodeSearchResult; 72, identifier:self; 73, identifier:params; 74, identifier:etag; 75, identifier:headers; 76, string; 77, identifier:query; 78, subscript; 79, identifier:sort; 80, string; 81, string; 82, subscript; 83, identifier:order; 84, identifier:headers; 85, dictionary; 86, identifier:self; 87, identifier:_build_url; 88, string; 89, string; 90, string_content:q; 91, identifier:params; 92, string; 93, string_content:asc; 94, string_content:desc; 95, identifier:params; 96, string; 97, pair; 98, string_content:search; 99, string_content:code; 100, string_content:sort; 101, string_content:order; 102, string; 103, string; 104, string_content:Accept; 105, string_content:application/vnd.github.v3.full.text-match+json
code: def search_code(self, query, sort=None, order=None, per_page=None,
                      text_match=False, number=-1, etag=None):
          """Find code via the code search API.
  
          The query can contain any combination of the following supported
          qualifiers:
  
          - ``in`` Qualifies which fields are searched. With this qualifier you
            can restrict the search to just the file contents, the file path, or
            both.
          - ``language`` Searches code based on the language it’s written in.
          - ``fork`` Specifies that code from forked repositories should be
            searched.  Repository forks will not be searchable unless the fork
            has more stars than the parent repository.
          - ``size`` Finds files that match a certain size (in bytes).
          - ``path`` Specifies the path that the resulting file must be at.
          - ``extension`` Matches files with a certain extension.
          - ``user`` or ``repo`` Limits searches to a specific user or
            repository.
  
          For more information about these qualifiers, see: http://git.io/-DvAuA
  
          :param str query: (required), a valid query as described above, e.g.,
              ``addClass in:file language:js repo:jquery/jquery``
          :param str sort: (optional), how the results should be sorted;
              option(s): ``indexed``; default: best match
          :param str order: (optional), the direction of the sorted results,
              options: ``asc``, ``desc``; default: ``desc``
          :param int per_page: (optional)
          :param bool text_match: (optional), if True, return matching search
              terms. See http://git.io/iRmJxg for more information
          :param int number: (optional), number of repositories to return.
              Default: -1, returns all available repositories
          :param str etag: (optional), previous ETag header value
          :return: generator of :class:`CodeSearchResult
              <github3.search.CodeSearchResult>`
          """
          params = {'q': query}
          headers = {}
  
          if sort == 'indexed':
              params['sort'] = sort
  
          if sort and order in ('asc', 'desc'):
              params['order'] = order
  
          if text_match:
              headers = {
                  'Accept': 'application/vnd.github.v3.full.text-match+json'
                  }
  
          url = self._build_url('search', 'code')
          return SearchIterator(number, url, CodeSearchResult, self, params,
                                etag, headers)