@staticmethod
def rename_attributes(**kwds):
    """Rename node and edge attributes.

        In the style dictionary multiple keywords can be used to address
        attributes. These keywords will be converted to an unique key word,
        used in the remaining code. This allows to keep the keywords used in
        'igrap'.

        ========= ===========================
        keys      other valid keys
        ========= ===========================
        node      vertex, v, n
        edge      link, l, e
        margins   margin
        canvas    bbox, figure_size
        units     unit
        ========= ===========================

        """
    names = {'node_': ['vertex_', 'v_', 'n_'], 'edge_': ['edge_', 'link_',
        'l_', 'e_'], 'margins': ['margin'], 'canvas': ['bbox',
        'figure_size'], 'units': ['units', 'unit']}
    _kwds = {}
    del_keys = []
    for key, value in kwds.items():
        for attr, name_list in names.items():
            for name in name_list:
                if name in key and name[0] == key[0]:
                    _kwds[key.replace(name, attr)] = value
                    del_keys.append(key)
                    break
    for key in del_keys:
        del kwds[key]
    return {**_kwds, **kwds}
