You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: demo_imRAG_coins.m
    path of file: ./repos/matImage/demos/imMeasures
    
    the code of the file until where you have to start completion: %DEMO_IMRAG_COINS  One-line description here, please.
%
%   output = demo_imRAG_coins(input)
%
%   Example
%   demo_imRAG_coins
%
%   See also
%
 
% ------
% Author: 
    
function
dist = bwdist(bin);
imshow(dist, []); title('distance function');

% compute watershed
distf = imfilter(dist, ones(3, 3)/9, inf);
wat = watershed(distf, 4);

% superposition of watershed on original image
ovr = imOverlay(img, imdilate(wat==0, ones(3, 3)));

% display result
figure;
imshow(ovr);
title('watershed');


%% Region adjacency graph

% Compute RAG
[nodeList, edgeList] = imRAG(wat);

% diplay RAG with surimpression
hold on;
for i = 1:size(edgeList, 1)
    edge = edgeList(i,:);
    plot(nodeList(edge, 1), nodeList(edge, 2), 'linewidth', 2, 'color', 'g');
end