def METHOD_NAME(context, switch_type, target):
    if "available" in target:
        context.switch_port = return_port_by_availability(context)
        target = target.replace("available", f"{context.switch_port}")
    context.virtual_switch_name = f"brqa{random_string(10)}"
    return_1 = send_terminal_commands(f"ovs-vsctl add-br {context.virtual_switch_name}")
    assert_that(return_1, equal_to(('', '')), "error to add virtual switch")
    return_2 = send_terminal_commands(f"ip link set {context.virtual_switch_name} up")
    assert_that(return_2, equal_to(('', '')), "error to set virtual switch up")
    assert_that(switch_type.lower(), any_of("netflow", "sflow"), f"Invalid switch type")
    if switch_type.lower() == "netflow":
        command = f"ovs-vsctl set bridge {context.virtual_switch_name} netflow=@netflow -- --id=@netflow create NetFlow targets={target}"
    else:
        command = f"ovs-vsctl -- --id=@sflow create sflow agent={context.mock_iface_name} target=\"{target}\" header=128 sampling=64 polling=10 -- set bridge {context.virtual_switch_name} sflow=@sflow"
    return_3 = send_terminal_commands(command)
    assert_that(return_3[1], equal_to(''), f"error to configure {switch_type} switch")