def METHOD_NAME(tar_or_other):
    from tarfile import ReadError
    import tarfile
    try:
      T = tarfile.open(name=tar_or_other, mode='r')
      K = T.getmembers()
      NT = len(K)
      for nt in range(NT):
        k = os.path.basename(K[nt].path)
        fileIO = T.extractfile(member=K[nt])
        yield fileIO,K[nt].path
    except ReadError as e:
      fileIO = open(tar_or_other,'rb')
      yield fileIO,tar_or_other