def type_to_str(type_object) ->str:
    """
    convert a type object to class path in str format
    :param type_object: type
    :return: class path
    """
    cls_name = str(type_object)
    assert cls_name.startswith("<class '"), 'illegal input'
    cls_name = cls_name[len("<class '"):]
    assert cls_name.endswith("'>"), 'illegal input'
    cls_name = cls_name[:-len("'>")]
    return cls_name
