code: def _safemembers(members):
      
      base = _resolved(".")
  
      for finfo in members:
          if _badpath(finfo.name, base):
              print(finfo.name, "is blocked (illegal path)")
          elif finfo.issym() and _badlink(finfo, base):
              print(finfo.name, "is blocked: Hard link to", finfo.linkname)
          elif finfo.islnk() and _badlink(finfo, base):
              print(finfo.name, "is blocked: Symlink to", finfo.linkname)
          else:
              yield finfo
docs: Check members of a tar archive for safety.
      Ensure that they do not contain paths or links outside of where we
      need them - this would only happen if the archive wasn't made by
      eqcorrscan.
  
      :type members: :class:`tarfile.TarFile`
      :param members: an open tarfile.