def METHOD_NAME(v):
    if v is None or isinstance(v, AnsibleUnsafe):
        return v
    if isinstance(v, Mapping):
        v = _wrap_dict(v)
    elif isinstance(v, Set):
        v = _wrap_set(v)
    elif is_sequence(v):
        v = _wrap_sequence(v)
    elif isinstance(v, NativeJinjaText):
        v = NativeJinjaUnsafeText(v)
    elif isinstance(v, binary_type):
        v = AnsibleUnsafeBytes(v)
    elif isinstance(v, text_type):
        v = AnsibleUnsafeText(v)
    return v