def fix_name(name):
    # Some typelibs contain BSTR with embedded NUL characters,
    # probably the len of the BSTR is wrong.
    if name is None:
        return name
    return name.split("\0")[0]
dataset/ETHPy150Open enthought/comtypes/comtypes/typeinfo.py/fix_name/original