def replace_magic_methods(cls, fn):
    for attr in __magic_methods__:
        setattr(cls, attr, fn)
    return
Replace the magic method of a class with some function or method.
dataset/ETHPy150Open billpmurphy/hask/hask/lang/syntax.py/replace_magic_methods