class_docstr: Entropy based NCD
  
  Get Entropy of input sequence as a size of compressed data.
  
  https://en.wikipedia.org/wiki/Entropy_(information_theory)
  https://en.wikipedia.org/wiki/Entropy_encoding
code: def _compress(self, data: Sequence) -> float:
      total_count = len(data)
      entropy = 0.0
      for element_count in Counter(data).values():
          p = element_count / total_count
          entropy -= p * math.log(p, self.base)
      assert entropy >= 0
      return entropy
  
imports: from __future__ import annotations
  import codecs
  import math
  from collections import Counter
  from fractions import Fraction
  from itertools import groupby, permutations
  from typing import Any, Sequence, TypeVar
  from .base import Base
label_desc: Use image node_id 2 for calling the EntropyNCD obj's underlying member method code with example usage: obj._compress(data) and returns: entropy