class_docstr: Structured environment version of the cutting 2D environment.
  The environment alternates between the two sub-steps:
  
  - Select cutting piece
  - Select cutting configuration (cutting order and cutting orientation)
  
  :param maze_env: The "flat" cutting 2D environment to wrap.
class_docstr_tok: ["Structured","environment","version","of","the","cutting","2D","environment",".","The","environment","alternates","between","the","two","sub-steps",":","-","Select","cutting","piece","-","Select","cutting","configuration","(","cutting","order","and","cutting","orientation",")",":","param","maze_env",":","The","``","flat","''","cutting","2D","environment","to","wrap","."]
docstr: Generic step function alternating between the two sub-steps.
  :return: obs, rew, done, info
docstr_tok: ["Generic","step","function","alternating","between","the","two","sub-steps",".",":","return",":","obs",",","rew",",","done",",","info"]
code: def step(self, action):
      """Generic step function alternating between the two sub-steps.
      :return: obs, rew, done, info
      """
      # sub-step: Select cutting piece
      if self._sub_step_key == 0:
          sub_step_result = self._selection_step(action)
      # sub-step: Select cutting configuration
      elif self._sub_step_key == 1:
          sub_step_result = self._cutting_step(action)
      else:
          raise ValueError(
              "Sub-step id {} not allowed for this environment!".format(
                  self._sub_step_key
              )
          )
  
      # alternate step index
      self._sub_step_key = np.mod(self._sub_step_key + 1, 2)
  
      return sub_step_result
  
imports: from copy import deepcopy
  from typing import Dict, Any, Union, Tuple, Optional, List
  import gym
  import numpy
  from maze.core.env.maze_action import MazeActionType
  from maze.core.env.maze_env import MazeEnv
  from maze.core.env.maze_state import MazeStateType
  from maze.core.env.structured_env import StructuredEnv, ActorID
  from maze.core.env.structured_env_spaces_mixin import StructuredEnvSpacesMixin
  from maze.core.wrappers.wrapper import Wrapper
  from .maze_env import maze_env_factory
label_desc: Use image node_id 2 for calling the StructuredCutting2DEnvironment obj's underlying member method code with example usage: obj.step(action) and returns: sub_step_result