code: def from_filepath(cls, filepath):
          '''A function to replace the old constructor call where a filename was passed in.'''
          assert(os.path.exists(filepath))
          return cls(read_file(filepath)f from_filepath(cls, filepath):
          '''A function to replace the old constructor call where a filename was passed in.'''
          assert(os.path.exists(filepath))
          return cls(read_file(filepath))
docs: A function to replace the old constructor call where a filename was passed in.