def get_node_property_value()

in src/graph_notebook/network/opencypher/OCNetwork.py [0:0]


    def get_node_property_value(self, node: dict, props: dict, title, custom_property):
        try:
            if isinstance(custom_property, dict):
                if isinstance(custom_property[title], tuple):
                    if custom_property[title][0] in props and \
                            isinstance(props[custom_property[title][0]], list) and \
                            len(props[custom_property[title][0]]) >= 2:
                        label = props[custom_property[title][0]][custom_property[title][1]]
                    else:
                        label = title
                elif custom_property[title] in props:
                    label = props[custom_property[title]]
                elif LABEL_KEY in props:
                    label = props[LABEL_KEY]
                else:
                    label = props
            elif isinstance(custom_property, tuple) and custom_property[0] in props:
                if isinstance(props[custom_property[0]], list) and len(props[custom_property[0]]) >= 2:
                    label = props[custom_property[0]][custom_property[1]]
                else:
                    label = title
            elif custom_property == ID_KEY:
                label = node[ID_KEY]
            elif custom_property == LABEL_KEY:
                label = node[LABEL_KEY]
            elif custom_property == VERTEX_TYPE_KEY:
                label = node[VERTEX_TYPE_KEY]
            elif custom_property in props:
                label = props[custom_property]
            else:
                label = title
        except (KeyError, IndexError) as e:
            logger.debug(e)
            label = title

        return label