def METHOD_NAME():
    class Foo(object):
        def __repr__(self):
            raise ValueError
    x = Foo()
    result = transform(x)
    expected = "<BadRepr: <class 'tests.utils.encoding.tests.test_transform_broken_repr.<locals>.Foo'>>"
    assert result == expected