docs: def get_environment(config, stage):
      """Find default environment name in stage."""
      stage_data = get_stage_data(stage, config.get('stages', {}))
      if not stage_data:
          sys.exit(NO_STAGE_DATA.format(stage))
      try:
          return stage_data['environment']
      except KeyError:
          sys.exit(NO_ENV_IN_STAGE.format(stage))