code: def copy_state(self, state):
          
          if self.copy_strategy == 'deepcopy':
              return copy.deepcopy(state)
          elif self.copy_strategy == 'slice':
              return state[:]
          elif self.copy_strategy == 'method':
              return state.copy()
          else:
              raise RuntimeError('No implementation found for ' +
                                 'the self.copy_strategy "%s"' %
                                 self.copy_strategy)
docs: Returns an exact copy of the provided state
          Implemented according to self.copy_strategy, one of
  
          * deepcopy : use copy.deepcopy (slow but reliable)
          * slice: use list slices (faster but only works if state is list-like)
          * method: use the state's copy() method