def _instruction_getter(self, name, env_replace):
if name != '<STR_LIT>' and name != '<STR_LIT>':<EOL><INDENT>raise ValueError("<STR_LIT>", name)<EOL><DEDENT>instructions = {}<EOL>envs = {}<EOL>for instruction_desc in self.structure:<EOL><INDENT>this_instruction = instruction_desc['<STR_LIT>']<EOL>if this_instruction == '<STR_LIT>':<EOL><INDENT>instructions.clear()<EOL>envs = self.parent_env.copy()<EOL><DEDENT>elif this_instruction in (name, '<STR_LIT>'):<EOL><INDENT>logger.debug("<STR_LIT>", name.lower(), instruction_desc['<STR_LIT:value>'])<EOL>key_val_list = extract_labels_or_envs(env_replace=env_replace,<EOL>envs=envs,<EOL>instruction_value=instruction_desc['<STR_LIT:value>'])<EOL>for key, value in key_val_list:<EOL><INDENT>if this_instruction == name:<EOL><INDENT>instructions[key] = value<EOL>logger.debug("<STR_LIT>", name.lower(), key, value)<EOL><DEDENT>if this_instruction == '<STR_LIT>':<EOL><INDENT>envs[key] = value<EOL><DEDENT><DEDENT><DEDENT><DEDENT>logger.debug("<STR_LIT>", instructions)<EOL>return Labels(instructions, self) if name == '<STR_LIT>' else Envs(instructions, self)<EOL>
Get LABEL or ENV instructions with environment replacement

:param name: e.g. 'LABEL' or 'ENV'
:param env_replace: bool, whether to perform ENV substitution
:return: Labels instance or Envs instance