def remove_geometries(data):
    """Remove geometry attributes from NetworkX adjacency data object,
    because they are not serializable. Mutates the ``data`` object.

    Does nothing if no geometry attributes are found.

    :param data: an adjacency data object (returned by
        :func:`networkx.readwrite.json_graph.adjacency_data`)
    """
    for node in data['nodes']:
        bad_keys = []
        for key in node:
            if hasattr(node[key], '__geo_interface__'):
                bad_keys.append(key)
        for key in bad_keys:
            del node[key]
