def METHOD_NAME(v):
    if isinstance(v, Operator):
        mpi_range = type(v.range) in mpi_spaces or v.range.id in mpi_spaces
        mpi_source = type(v.source) in mpi_spaces or v.source.id in mpi_spaces
        if mpi_range or mpi_source:
            return _OperatorToWrap(mpi.manage_object(v), mpi_range, mpi_source)
        else:
            return v
    else:
        return v