code: def check_errors(self, is_global=False):
      
      errors = self.global_errors if is_global else self.errors
      if errors:
        print('dfTimewolf encountered one or more errors:')
        for error, critical in errors:
          print('{0:s}  {1:s}'.format('CRITICAL: ' if critical else '', error))
          if critical:
            print('Critical error found. Aborting.')
            sys.exit(-1)
docs: Checks for errors and exits if any of them are critical.
  
      Args:
        is_global: If True, check the global_errors attribute. If false, check the
            error attribute.