docs: def exists(path, with_expected_db_version=None):
          """
          Does the db exist, optionally with the expected version
          :param path:
          :param with_expected_db_version:
          :return:
          """
          dbmetafile = os.path.join(path, AnchoreImageDB._db_metadata_filename)
  
          if not os.path.exists(path) or not os.path.exists(dbmetafile):
              return False
  
          if with_expected_db_version:
              with open(dbmetafile, 'r') as f:
                  json_dict = json.load(f)
  
              if json_dict['anchore_db_version'] != with_expected_db_version:
                  return False
          else:
              return True