def volume_meter(a: float) -> str:
  """Text art volume meter, where 0 <= a <= 1."""
  level = min(max(int(round(a * 40)), 0), 40)
  full_blocks = min(4, level // 8)
  bar = (u'\u2588' * full_blocks +
         u' \u258F\u258E\u258D\u258C\u258B\u258A\u2589\u2588'[level -
                                                              full_blocks * 8])
  bar += u' ' * (5 - len(bar))
  return u'[\x1b[1;32m%s\x1b[0m]' % bar