code: def valid_miflora_mac(mac, pat=re.compile(r"C4:7C:8D:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}")):
      
      if not pat.match(mac.upper()):
          raise argparse.ArgumentTypeError('The MAC address "{}" seems to be in the wrong format'.format(mac))
      return mac
docs: Check for valid mac adresses.