class_docstr: Query is used to build complex queries that have more parameters than just
  the query string. The query string is set in the constructor, and other
  options have setter functions.
  
  The setter functions return the query object, so they can be chained,
  i.e. `Query("foo").verbatim().filter(...)` etc.
docstr: Add a sortby field to the query.
  
  - **field** - the name of the field to sort by
  - **asc** - when `True`, sorting will be done in asceding order
code: def sort_by(self, field: str, asc: bool = True) -> "Query":
      """
      Add a sortby field to the query.
  
      - **field** - the name of the field to sort by
      - **asc** - when `True`, sorting will be done in asceding order
      """
      self._sortby = SortbyField(field, asc)
      return self
  
imports: from typing import List, Optional, Union
label_desc: Use image node_id 24 for calling the Query obj's underlying member method code with example usage: obj.sort_by(field, asc) and returns: self