':param parameterset:
a legacy style parameterset that may or may not be a tuple,
and may or may not be wrapped into a mess of mark objects
:param legacy_force_tuple:
enforce tuple wrapping so single argument tuple values
don\'t get decomposed and break tests'

@classmethod
def extract_from(cls, parameterset, legacy_force_tuple=False):

    if isinstance(parameterset, cls):
        return parameterset
    if ((not isinstance(parameterset, MarkDecorator)) and legacy_force_tuple):
        return cls.param(parameterset)
    newmarks = []
    argval = parameterset
    while isinstance(argval, MarkDecorator):
        newmarks.append(MarkDecorator(Mark(argval.markname, argval.args[:(-1)], argval.kwargs)))
        argval = argval.args[(-1)]
    assert (not isinstance(argval, ParameterSet))
    if legacy_force_tuple:
        argval = (argval,)
    if newmarks:
        warnings.warn(MARK_PARAMETERSET_UNPACKING)
    return cls(argval, marks=newmarks, id=None)
