def METHOD_NAME(cls, tag: ET.Element, field_types_by_caption=None):
    """
    :param tag:
    :type field_types_by_caption: dict[str, FieldType]
    :return:
    """
    label_tag = tag.find("label")
    if label_tag is not None:
        label = ProtocolLabel.METHOD_NAME(label_tag, field_types_by_caption)
    else:
        label = ChecksumLabel.METHOD_NAME(tag.find("checksum_label"), field_types_by_caption)
    result = SimulatorProtocolLabel(label)
    result.value_type_index = Formatter.str2val(tag.get("value_type_index", "0"), int)
    result.external_program = tag.get("external_program", "")
    result.formula = tag.get("formula", "")
    result.random_min = Formatter.str2val(tag.get("random_min", "0"), int)
    result.random_max = Formatter.str2val(tag.get("random_max", str(label.fuzz_maximum-1)), int)
    return result