code: def load(cls, fname, args):
      
  
      if args.type == JSON:
          if fname.endswith('.bz2'):
              open_ = bz2.open
          else:
              open_ = open
  
          if args.progress:
              print('Loading JSON data...')
  
          with open_(fname, 'rt') as fp:
              storage = JsonStorage.load(fp)
      else:
          storage = SqliteStorage.load(fname)
  
      if args.settings is not None:
          extend(storage.settings, args.settings)
  
      return cls.from_storage(storage)
docs: Load a generator.
  
      Parameters
      ----------
      cls : `type`
          Generator class.
      fname : `str`
          Input file path.
      args : `argparse.Namespace`
          Command arguments.
  
      Returns
      -------
      `cls`