old_contents: import re
  
  from .client import ArchivesSpaceClient
  from .reporter import CSVReporter
  from .validator import Validator
  
  
  class DACSspace:
      """Base DACSspace class. Fetches data from AS, validates and reports results."""
  
      def __init__(self, csv_filepath):
          """Checks csv filepath to make sure it has the proper extension and characters."""
          if not csv_filepath.endswith(".csv"):
              raise ValueError("File must have .csv extension")
          if re.search(r'[*?:"<>|]', csv_filepath):
              raise ValueError(
                  'File name cannot contain the following characters: * ? : " < > | ')
          self.csv_filepath = csv_filepath
  
      def run(self, published_only, invalid_only,
              schema_identifier, schema_filepath):
          client = ArchivesSpaceClient()
          validator = Validator(schema_identifier, schema_filepath)
          reporter = CSVReporter(self.csv_filepath)
          data = client.get_resources(published_only)
          results = [validator.validate(obj) for obj in data]
          reporter.write_report(results, invalid_only)
  
new_contents: import re
  
  from .client import ArchivesSpaceClient
  from .reporter import CSVReporter
  from .validator import Validator
  
  
  class DACSspace:
      """Base DACSspace class. Fetches data from AS, validates and reports results."""
  
      def __init__(self, csv_filepath):
          """Checks csv filepath to make sure it has the proper extension and characters."""
          if not csv_filepath.endswith(".csv"):
              raise ValueError("File must have .csv extension")
          if re.search(r'[*?:"<>|]', csv_filepath):
              raise ValueError(
                  'File name cannot contain the following characters: * ? : " < > | ')
          self.csv_filepath = csv_filepath
  
      def run(self, published_only, invalid_only,
              schema_identifier, schema_filepath):
          client = ArchivesSpaceClient()
          validator = Validator(schema_identifier, schema_filepath)
          reporter = CSVReporter(self.csv_filepath)
          data = client.get_resources(published_only)
          results = [validator.validate_data(obj) for obj in data]
          reporter.write_report(results, invalid_only)
  
subject: call correct method