nodes: 0, module; 1, function_definition; 2, function_name:query_log; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, dictionary_splat_pattern; 12, expression_statement; 13, expression_statement; 14, if_statement; 15, expression_statement; 16, expression_statement; 17, expression_statement; 18, expression_statement; 19, expression_statement; 20, return_statement; 21, identifier:filter; 22, None; 23, identifier:query; 24, None; 25, identifier:count; 26, None; 27, identifier:offset; 28, None; 29, identifier:sort; 30, None; 31, identifier:kwargs; 32, comment:"""
          Search the query and event log.
  
          Searches the query and event log to find query sessions that match the specified
          criteria. Searching the **logs** endpoint uses the standard Discovery query syntax
          for the parameters that are supported.
  
          :param str filter: A cacheable query that excludes documents that don't mention
          the query content. Filter searches are better for metadata-type searches and for
          assessing the concepts in the data set.
          :param str query: A query search returns all documents in your data set with full
          enrichments and full text, but with the most relevant documents listed first. Use
          a query search when you want to find the most relevant search results. You cannot
          use **natural_language_query** and **query** at the same time.
          :param int count: Number of results to return. The maximum for the **count** and
          **offset** values together in any one query is **10000**.
          :param int offset: The number of query results to skip at the beginning. For
          example, if the total number of results that are returned is 10 and the offset is
          8, it returns the last two results. The maximum for the **count** and **offset**
          values together in any one query is **10000**.
          :param list[str] sort: A comma-separated list of fields in the document to sort
          on. You can optionally specify a sort direction by prefixing the field with `-`
          for descending or `+` for ascending. Ascending is the default sort direction if no
          prefix is specified.
          :param dict headers: A `dict` containing the request headers
          :return: A `DetailedResponse` containing the result, headers and HTTP status code.
          :rtype: DetailedResponse
          """; 33, assignment; 34, comparison_operator:'headers' in kwargs; 35, block; 36, assignment; 37, call; 38, assignment; 39, assignment; 40, assignment; 41, identifier:response; 42, identifier:headers; 43, dictionary; 44, string; 45, identifier:kwargs; 46, expression_statement; 47, identifier:sdk_headers; 48, call; 49, attribute; 50, argument_list; 51, identifier:params; 52, dictionary; 53, identifier:url; 54, string; 55, identifier:response; 56, call; 57, string_content:headers; 58, call; 59, identifier:get_sdk_headers; 60, argument_list; 61, identifier:headers; 62, identifier:update; 63, identifier:sdk_headers; 64, pair; 65, pair; 66, pair; 67, pair; 68, pair; 69, pair; 70, string_content:/v1/logs; 71, attribute; 72, argument_list; 73, attribute; 74, argument_list; 75, string; 76, string; 77, string; 78, string; 79, attribute; 80, string; 81, identifier:filter; 82, string; 83, identifier:query; 84, string; 85, identifier:count; 86, string; 87, identifier:offset; 88, string; 89, call; 90, identifier:self; 91, identifier:request; 92, keyword_argument; 93, keyword_argument; 94, keyword_argument; 95, keyword_argument; 96, keyword_argument; 97, identifier:headers; 98, identifier:update; 99, call; 100, string_content:discovery; 101, string_content:V1; 102, string_content:query_log; 103, string_content:version; 104, identifier:self; 105, identifier:version; 106, string_content:filter; 107, string_content:query; 108, string_content:count; 109, string_content:offset; 110, string_content:sort; 111, attribute; 112, argument_list; 113, identifier:method; 114, string; 115, identifier:url; 116, identifier:url; 117, identifier:headers; 118, identifier:headers; 119, identifier:params; 120, identifier:params; 121, identifier:accept_json; 122, True; 123, attribute; 124, argument_list; 125, identifier:self; 126, identifier:_convert_list; 127, identifier:sort; 128, string_content:GET; 129, identifier:kwargs; 130, identifier:get; 131, string; 132, string_content:headers
code: def query_log(self,
                    filter=None,
                    query=None,
                    count=None,
                    offset=None,
                    sort=None,
                    **kwargs):
          """
          Search the query and event log.
  
          Searches the query and event log to find query sessions that match the specified
          criteria. Searching the **logs** endpoint uses the standard Discovery query syntax
          for the parameters that are supported.
  
          :param str filter: A cacheable query that excludes documents that don't mention
          the query content. Filter searches are better for metadata-type searches and for
          assessing the concepts in the data set.
          :param str query: A query search returns all documents in your data set with full
          enrichments and full text, but with the most relevant documents listed first. Use
          a query search when you want to find the most relevant search results. You cannot
          use **natural_language_query** and **query** at the same time.
          :param int count: Number of results to return. The maximum for the **count** and
          **offset** values together in any one query is **10000**.
          :param int offset: The number of query results to skip at the beginning. For
          example, if the total number of results that are returned is 10 and the offset is
          8, it returns the last two results. The maximum for the **count** and **offset**
          values together in any one query is **10000**.
          :param list[str] sort: A comma-separated list of fields in the document to sort
          on. You can optionally specify a sort direction by prefixing the field with `-`
          for descending or `+` for ascending. Ascending is the default sort direction if no
          prefix is specified.
          :param dict headers: A `dict` containing the request headers
          :return: A `DetailedResponse` containing the result, headers and HTTP status code.
          :rtype: DetailedResponse
          """
  
          headers = {}
          if 'headers' in kwargs:
              headers.update(kwargs.get('headers'))
          sdk_headers = get_sdk_headers('discovery', 'V1', 'query_log')
          headers.update(sdk_headers)
  
          params = {
              'version': self.version,
              'filter': filter,
              'query': query,
              'count': count,
              'offset': offset,
              'sort': self._convert_list(sort)
          }
  
          url = '/v1/logs'
          response = self.request(
              method='GET',
              url=url,
              headers=headers,
              params=params,
              accept_json=True)
          return response