def METHOD_NAME(dataSources, upstreamDataSources, id):
    from ansys.grpc.dpf import data_sources_pb2
    request = data_sources_pb2.UpdateUpstreamRequest()
    request.upstream_data_sources.CopyFrom(upstreamDataSources._internal_obj)
    request.data_sources.CopyFrom(dataSources._internal_obj)
    request.domain.domain_path = True
    request.domain.domain_id = id
    _get_stub(dataSources._server).UpdateUpstream(request)