A code for m-bipartite edge-coloured graphs