(label, items)
| 377 | raise SyntaxError("Wrong format of e sub label: " + str(items)) |
| 378 | |
| 379 | def process_label(label, items): |
| 380 | e_label = EdgeLabel(label, id_type) |
| 381 | if isinstance(items, (Loader, str, pd.DataFrame, *VineyardObjectTypes)): |
| 382 | e_label.add_sub_label(process_sub_label(items)) |
| 383 | elif isinstance(items, Sequence): |
| 384 | if isinstance( |
| 385 | items[0], (Loader, str, pd.DataFrame, *VineyardObjectTypes, np.ndarray) |
| 386 | ): |
| 387 | e_label.add_sub_label(process_sub_label(items)) |
| 388 | else: |
| 389 | for item in items: |
| 390 | e_label.add_sub_label(process_sub_label(item)) |
| 391 | elif isinstance(items, Mapping): |
| 392 | e_label.add_sub_label(process_sub_label(items)) |
| 393 | else: |
| 394 | raise SyntaxError("Wrong format of e label: " + str(items)) |
| 395 | return e_label |
| 396 | |
| 397 | e_labels = [] |
| 398 | if edges is None: |
no test coverage detected