<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _creation_function(self, idx, seed, preset):
 """ Helper function to create a proper closure around supplied values """

        return lambda: self.env.instantiate(seed=seed, serial_id=idx, preset=preset)