(entities)
| 26 | ENCODER = None |
| 27 | |
| 28 | def check_test(entities): |
| 29 | e_l=[] |
| 30 | max_len=len(entities) |
| 31 | for layer in entities: |
| 32 | temp_e=[] |
| 33 | if type(layer) != list: |
| 34 | temp_e.append(layer['entity_name']) |
| 35 | e_l.append(temp_e) |
| 36 | continue |
| 37 | for item in layer: |
| 38 | temp_e.append(item['entity_name']) |
| 39 | e_l.append(temp_e) |
| 40 | |
| 41 | for index,layer in enumerate(entities): |
| 42 | if type(layer) != list or index==max_len-1: |
| 43 | break |
| 44 | for item in layer: |
| 45 | if item['parent'] not in e_l[index+1]: |
| 46 | print(item['entity_name'],item['parent']) |
| 47 | def extract_first_complete_json(s: str): |
| 48 | """Extract the first complete JSON object from the string using a stack to track braces.""" |
| 49 | stack = [] |
nothing calls this directly
no outgoing calls
no test coverage detected