def _remove_empty_dict_leaf()

in pybulletX/robot_interface.py [0:0]


def _remove_empty_dict_leaf(dict_):
    return {
        k: v
        for k, v in dict_.items()
        if not isinstance(v, collections.abc.Mapping) or len(v) > 0
    }