def METHOD_NAME(marks, nested):
    markstr = []
    for m in marks:
        if m == "psi":
            pass
        elif m == "quicktests":
            markstr.append("quick")
        elif m == "longtests":
            markstr.append("long")
        elif m == "smoketests":
            markstr.append("smoke")
        elif m == "addon":
            pass
        elif m == nested:
            if m in ["json"]:
                markstr.append(m)
            else:
                pass
        else:
            markstr.append(m)
    return markstr