code: def query(self):
          
          query = (
              self.book.session.query(Commodity)
              .filter(Commodity.namespace != "CURRENCY",
                      Commodity.namespace != "template")
          )
          return query
docs: Returns the base query which filters out data for all queries.