def get_dict_element_property_value()

in src/graph_notebook/network/gremlin/GremlinNetwork.py [0:0]


    def get_dict_element_property_value(self, element, k, temp_label, custom_property):
        property_value = None
        if isinstance(temp_label, list):
            temp_label = str(temp_label).strip("[]'")
        if isinstance(custom_property, dict):
            try:
                if isinstance(custom_property[temp_label], tuple) and isinstance(element[k], list):
                    if str(k) == custom_property[temp_label][0]:
                        try:
                            property_value = element[k][custom_property[temp_label][1]]
                        except (TypeError, IndexError):
                            logger.debug(f"Failed to index into sub-property for: {element[k]} and "
                                         f"{custom_property[temp_label]}")
                            return
                elif str(k) == custom_property[temp_label]:
                    property_value = element[k]
            except KeyError:
                return
        elif isinstance(custom_property, tuple):
            if str(k) == custom_property[0] and isinstance(element[k], list):
                try:
                    property_value = element[k][custom_property[1]]
                except IndexError:
                    logger.debug(f"Failed to index into sub-property for: {element[k]} and "
                                 f"{custom_property[0]}")
                    return
        elif str(k) == custom_property:
            property_value = element[k]

        return property_value