class_docstr: Example vectorized environment, illustrating best-practice implementation pattern.
  
  State space: position in [0, 10].
  Action space: movement in {-1, 0, 1}.
  Random start in [0, 3] or [7, 10].
  Positive reward for moving towards the center 5.
class_docstr_tok: ["Example","vectorized","environment",",","illustrating","best-practice","implementation","pattern",".","State","space",":","position","in","[","0",",","10","]",".","Action","space",":","movement","in","{","-1",",","0",",","1","}",".","Random","start","in","[","0",",","3","]","or","[","7",",","10","]",".","Positive","reward","for","moving","towards","the","center","5","."]
code: def reset(self, num_parallel=None):
      # Always for vectorized environments: initialize parallel indices
      self._is_parallel = num_parallel is not None
      if self._is_parallel:
          self._parallel_indices = np.arange(num_parallel)
      else:
          self._parallel_indices = np.arange(1)
  
      # Vectorized environment logic
      is_high = (
          np.random.random_sample(size=self._parallel_indices.shape)
          < 0.5
      )
      offset = np.random.randint(4, size=self._parallel_indices.shape)
      self._states = np.where(is_high, 10 - offset, offset)
  
      # Always for vectorized environments: return un-/vectorized values
      if self._is_parallel:
          return self._parallel_indices.copy(), self._states.copy()
      else:
          return self._states[0]
  
file_path: tensorforce/examples/vectorized_environment.py
imports: import numpy
  from tensorforce import Environment, Runner
label_desc: Use image node_id 5 for calling the VectorizedEnvironment obj's underlying member method code with example usage: obj.reset(num_parallel) and returns: self,  self, self