code: def test_query_environments_multiple(self):
      environment_1 = self.dal.environment.create(
          Environment(self.environment_input_dict)
      )
      environment_2 = self.dal.environment.create(
          Environment(self.environment_input_dict)
      )
      environment_3 = self.dal.environment.create(
          Environment(self.environment_input_dict)
      )
  
      results = self.dal.environment.query(
          {}, sort_key="created_at", sort_order="ascending"
      )
      assert len(results) == 3
      assert results[0].created_at == environment_1.created_at
      assert results[1].created_at == environment_2.created_at
  
      results = self.dal.environment.query(
          {}, sort_key="created_at", sort_order="descending"
      )
      assert len(results) == 3
      assert results[0].created_at == environment_3.created_at
      assert results[1].created_at == environment_2.created_at
  
      # Wrong order being passed in
      failed = False
      try:
          _ = self.dal.environment.query(
              {}, sort_key="created_at", sort_order="wrong_order"
          )
      except InvalidArgumentType:
          failed = True
      assert failed
  
      # Wrong key and order being passed in
      failed = False
      try:
          _ = self.dal.environment.query(
              {}, sort_key="wrong_key", sort_order="wrong_order"
          )
      except InvalidArgumentType:
          failed = True
      assert failed
  
      # wrong key and right order being passed in
      expected_items = self.dal.environment.query(
          {}, sort_key="created_at", sort_order="ascending"
      )
      items = self.dal.environment.query(
          {}, sort_key="wrong_key", sort_order="ascending"
      )
      expected_ids = [item.id for item in expected_items]
      ids = [item.id for item in items]
      assert set(expected_ids) == set(ids)
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import tempfile
  import platform
  from datetime import datetime
  from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver
  from datmo.core.storage.local.dal import LocalDAL
  from datmo.core.entity.model import Model
  from datmo.core.entity.environment import Environment
  from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType
label_desc: Use image node_id 10 for calling the TestLocalDAL obj's underlying member method code with example usage: obj.test_query_environments_multiple() without return types