code: def loadBWT(bwtDir, logger=None):
      '''
      Generic load function, this is recommended for anyone wishing to use this code as it will automatically detect compression
      and assign the appropriate class preferring the decompressed version if both exist.
      @return - a MultiStringBWT, CompressedBWT, or none if neither can be instantiated
      '''
      if os.path.exists(bwtDir+'/msbwt.npy'):
          msbwt = MultiStringBWT()
          msbwt.loadMsbwt(bwtDir, logger)
          return msbwt
      elif os.path.exists(bwtDir+'/comp_msbwt.npy'):
          msbwt = CompressedMSBWT()
          msbwt.loadMsbwt(bwtDir, logger)
          return msbwt
      else:
          logger.error('Invalid BWT directory.')
          return Nonf loadBWT(bwtDir, logger=None):
      '''
      Generic load function, this is recommended for anyone wishing to use this code as it will automatically detect compression
      and assign the appropriate class preferring the decompressed version if both exist.
      @return - a MultiStringBWT, CompressedBWT, or none if neither can be instantiated
      '''
      if os.path.exists(bwtDir+'/msbwt.npy'):
          msbwt = MultiStringBWT()
          msbwt.loadMsbwt(bwtDir, logger)
          return msbwt
      elif os.path.exists(bwtDir+'/comp_msbwt.npy'):
          msbwt = CompressedMSBWT()
          msbwt.loadMsbwt(bwtDir, logger)
          return msbwt
      else:
          logger.error('Invalid BWT directory.')
          return None
docs: Generic load function, this is recommended for anyone wishing to use this code as it will automatically detect compression
      and assign the appropriate class preferring the decompressed version if both exist.
      @return - a MultiStringBWT, CompressedBWT, or none if neither can be instantiated