'Get the dates of edges from predecessors.'

def get_pred_dates(self, Gx, Gx_node, core_x, pred):

    pred_dates = []
    if (type(Gx) == type(nx.DiGraph())):
        for n in pred:
            pred_dates.append(Gx[n][Gx_node][self.temporal_attribute_name])
    else:
        for n in pred:
            for edge in Gx[n][Gx_node].values():
                pred_dates.append(edge[self.temporal_attribute_name])
    return pred_dates
