def METHOD_NAME(make_torch_flow, inputs, endpoint):
    from clip_client.client import Client
    c = Client(server=f'grpc://0.0.0.0:{make_torch_flow.port}')
    r = getattr(c, endpoint)(inputs if not callable(inputs) else inputs())
    if endpoint == 'encode':
        if isinstance(inputs, DocumentArray):
            assert isinstance(r, DocumentArray)
        else:
            assert isinstance(r, list)
    else:
        assert isinstance(r, DocumentArray)
    assert len(r) == 0