@pytest.fixture(autouse=True)
    def setup(self, request, as_connection):
        keys = []
        for i in range(5):
            key = ('test', 'demo', i)
            rec = {'name': 'name%s' % (str(i)),
                   'contact_no': [i, i + 1, i + 2, i + 3,
                                  i + 4, i + 5],
                   'city': ['Pune', 'Dehli', 'Mumbai']}
            self.as_connection.put(key, rec)
            keys.append(key)
        key = ('test', 'demo', 1)
        self.as_connection.list_append(key, "contact_no", [45, 50, 80])
        keys.append(key)

        def teardown():
            """
            Teardown method.
            """
            for key in keys:
                try:
                    as_connection.remove(key)
                except e.RecordNotFound:
                    pass

        request.addfinalizer(teardown)
dataset/ETHPy150Open aerospike/aerospike-client-python/test/new_tests/test_list_trim.py/TestListTrim.setup/original