docs: def queryTs(ts, expression):
      """
      Find the indices of the time series entries that match the given expression.
  
      | Example:
      | D = lipd.loadLipd()
      | ts = lipd.extractTs(D)
      | matches = queryTs(ts, "archiveType == marine sediment")
      | matches = queryTs(ts, "geo_meanElev <= 2000")
  
      :param str expression: Expression
      :param list ts: Time series
      :return list _idx: Indices of entries that match the criteria
      """
      # Make a copy of the ts. We're going to work directly on it.
      _idx = []
  
      # User provided a single query string
      if isinstance(expressions, str):
          # Use some magic to turn the given string expression into a machine-usable comparative expression.
          expr_lst = translate_expression(expressions)
          # Only proceed if the translation resulted in a usable expression.
          if expr_lst:
              # Return the new filtered time series. This will use the same time series
              # that filters down each loop.
              new_ts, _idx = get_matches(expr_lst, new_ts)
  
      # User provided a list of multiple queries
      elif isinstance(expressions, list):
          # Loop for each query
          for expr in expressions:
              # Use some magic to turn the given string expression into a machine-usable comparative expression.
              expr_lst = translate_expression(expr)
              # Only proceed if the translation resulted in a usable expression.
              if expr_lst:
                  # Return the new filtered time series. This will use the same time series
                  # that filters down each loop.
                  new_ts, _idx = get_matches(expr_lst, new_ts)
      return _idx