#!/usr/bin/python3

BLOCK_SIZE = 4

class FilterModule (object):
  def filters (self):
    return {
      'get_block_size_up': self.get_block_size_up,
      'get_block_size_down': self.get_block_size_down,
      'get_block_size_up_bytes': self.get_block_size_up_bytes,
      'get_block_size_down_bytes': self.get_block_size_down_bytes,
      'moo': self.moo
    }


  def get_block_size_up(self, start_size):
    while  start_size % BLOCK_SIZE != 0:
        start_size += 1
    return ('{}{}'.format(start_size, 'M'))

  def get_block_size_down(self, start_size):
    while  start_size % BLOCK_SIZE != 0:
        start_size -= 1
    return ('{}{}'.format(start_size, 'M'))

  def get_block_size_up_bytes(self, start_size):
    while  start_size % BLOCK_SIZE != 0:
        start_size += 1
    return ('{}'.format(start_size))

  def get_block_size_down_bytes(self, start_size):
    while  start_size % BLOCK_SIZE != 0:
        start_size -= 1
    return ('{}'.format(start_size))

  def moo(self, a_variable):
    a_new_variable = (str(a_variable) + '~~~~MOOOOOOOOOOOOOOOOOOOOOOOOO! => ' + '%s' % type(a_variable))
    return a_new_variable
