def METHOD_NAME(self):
    trm = partial(trim, max_depth=2)
    a: dict[str, Any] = {"a": {"b": {"c": "d"}}}
    assert trm(a) == a
    a = {"a": {"b": {"c": "d"}}}
    assert trm(a) == {"a": {"b": {"c": "d"}}}
    a = {"a": {"b": {"c": {"d": "e"}}}}
    assert trm(a) == {"a": {"b": {"c": '{"d":"e"}'}}}
    a = {"a": {"b": {"c": []}}}
    assert trm(a) == {"a": {"b": {"c": "[]"}}}