def METHOD_NAME(self, qdict):
    if not qdict:
        qdict = QueryDict(None, mutable=True)
    elif isinstance(qdict, QueryDict):
        qdict = qdict.copy()
    elif isinstance(qdict, (str, bytes)):
        if qdict.startswith("?"):
            qdict = qdict[1:]
        qdict = QueryDict(qdict, mutable=True)
    else:
        # Accept any old dict or list of pairs.
        try:
            pairs = qdict.items()
        except Exception:
            pairs = qdict
        qdict = QueryDict(None, mutable=True)
        # Enter each pair into QueryDict object:
        try:
            for k, v in pairs:
                # Convert values to str so that detecting
                # membership works for numbers.
                if isinstance(v, (list, tuple)):
                    for e in v:
                        qdict.appendlist(k, str(e))
                else:
                    qdict.appendlist(k, str(v))
        except Exception:
            # Wrong data structure, qdict remains empty.
            pass
    return qdict