def METHOD_NAME(container_name, threshold_value):
    """Checks the memory usage of a container and writes an alerting messages into
    the syslog if the memory usage is larger than the threshold value.
    Args:
        container_name: A string represtents name of a container
        threshold_value: An integer indicates the threshold value (Bytes) of memory usage.
    Returns:
        None.
    """
    command = ["docker", "stats", "--no-stream", "--format", "{{.MemUsage}}", container_name]
    command_stdout = get_command_result(command)
    mem_usage = command_stdout.split("/")[0].strip()
    match_obj = re.match(r"\d+\.?\d*", mem_usage)
    if match_obj:
        mem_usage_value = float(mem_usage[match_obj.start():match_obj.end()])
        mem_usage_unit = mem_usage[match_obj.end():]
        mem_usage_bytes = 0.0
        if mem_usage_unit == "B":
            mem_usage_bytes = mem_usage_value
        elif mem_usage_unit == "KiB":
            mem_usage_bytes = mem_usage_value * 1024
        elif mem_usage_unit == "MiB":
            mem_usage_bytes = mem_usage_value * 1024 ** 2
        elif mem_usage_unit == "GiB":
            mem_usage_bytes = mem_usage_value * 1024 ** 3
        if mem_usage_bytes > threshold_value:
            print("[{}]: Memory usage ({} Bytes) is larger than the threshold ({} Bytes)!"
                  .format(container_name, mem_usage_bytes, threshold_value))
            syslog.syslog(syslog.LOG_INFO, "[{}]: Memory usage ({} Bytes) is larger than the threshold ({} Bytes)!"
                          .format(container_name, mem_usage_bytes, threshold_value))
            # publish event
            publish_events(container_name, "{:.2f}".format(mem_usage_bytes), str(threshold_value))
            sys.exit(3)
    else:
        syslog.syslog(syslog.LOG_ERR, "[memory_checker] Failed to retrieve memory value from '{}'"
                      .format(mem_usage))
        sys.exit(4)