def __init__(self, points, labels=None, targets=None, targets_per_cp=None, hoffset=0, voffset=10, css=None):
    targets_ = []
    for x in (targets or []):
        x_ = []
        for y in x:
            x_.append(mpld3.utils.get_id(y))
        targets_.append(x_)
    self.targets_per_cp = []
    self.cps = []
    if targets_per_cp:
        self.cps = sorted(targets_per_cp.keys(), key=natural_sort_key)
        for cp in self.cps:
            x_ = []
            for y in targets_per_cp[cp]:
                x_.append(mpld3.utils.get_id(y))
            self.targets_per_cp.append(x_)
    super().__init__(points, labels, targets_, hoffset, voffset, css)
    self.dict_['targets_per_cp'] = self.targets_per_cp
    self.dict_['cps'] = self.cps
def __init__(self, points, labels=None, targets=None, targets_per_cp=None, hoffset=0, voffset=10, css=None):
    targets_ = []
    for x in (targets or []):
        x_ = []
        for y in x:
            x_.append(mpld3.utils.get_id(y))
        targets_.append(x_)
    self.targets_per_cp = []
    self.cps = []
    if targets_per_cp:
        self.cps = sorted(targets_per_cp.keys(), key=natural_sort_key)
        for cp in self.cps:
            x_ = []
            for y in targets_per_cp[cp]:
                x_.append(mpld3.utils.get_id(y))
            self.targets_per_cp.append(x_)
    super().__init__(points, labels, targets_, hoffset, voffset, css)
    self.dict_['targets_per_cp'] = self.targets_per_cp
    self.dict_['cps'] = self.cps