code: def _pvi_path(granule):
      
      pvi_name = granule._metadata.iter("PVI_FILENAME").next().text
      pvi_name = pvi_name.split("/")
      pvi_path = os.path.join(
          granule.granule_path,
          pvi_name[len(pvi_name)-2], pvi_name[len(pvi_name)-1]
      )
      try:
          assert os.path.isfile(pvi_path) or \
              pvi_path in granule.dataset._zipfile.namelist()
      except (AssertionError, AttributeError):
          return None
      return pvi_path
docs: Determine the PreView Image (PVI) path inside the SAFE pkg.