code: def read_file(self, location):
          
          try:
              return yaml.load(open(location))
          except (yaml.parser.ParserError, yaml.scanner.ScannerError) as error:
              raise self.BadFileErrorKls("Failed to read yaml", location=location, error_type=error.__class__.__name__, error="{0}{1}".format(error.problem, error.problem_mark))
docs: Read in a yaml file and return as a python object