def METHOD_NAME(proto_type):
    if proto_type == ProtoType.Binary:
        return TBinaryProtocolFactory()
    if proto_type == ProtoType.CyBinary:
        return TCyBinaryProtocolFactory()
    if proto_type == ProtoType.Compact:
        return TCompactProtocolFactory()
    if proto_type == ProtoType.Json:
        return TJSONProtocolFactory()