code: def ensure_stacker_compat_config(config_filename):
      
      try:
          with open(config_filename, 'r') as stream:
              yaml.safe_load(stream)
      except yaml.constructor.ConstructorError as yaml_error:
          if yaml_error.problem.startswith(
                  'could not determine a constructor for the tag \'!'):
              LOGGER.error('"%s" appears to be a CloudFormation template, '
                           'but is located in the top level of a module '
                           'alongside the CloudFormation config files (i.e. '
                           'the file or files indicating the stack names & '
                           'parameters). Please move the template to a '
                           'subdirectory.',
                           config_filename)
              sys.exit(1)
docs: Ensure config file can be loaded by Stacker.