code: def is_indexed(self, partition):
          
          query = text("""
              SELECT vid
              FROM partition_index
              WHERE vid = :vid;
          """)
          result = self.execute(query, vid=partition.vid)
          return bool(result.fetchall())
docs: Returns True if partition is already indexed. Otherwise returns False.