def METHOD_NAME(map_d_in, scaled_placement_verilog_d, top_level_args):
    Canvas = get_generator('CanvasPDK', top_level_args['pdk_dir'])
    canvas = Canvas()
    pin_tbl = {}
    for nm, gds_fn in map_d_in:
        pin_tbl[nm] = defaultdict(list)
        with pathlib.Path(gds_fn).with_suffix('.json').open('rt') as fp:
            j = json.load(fp=fp)
            for term in j['terminals']:
                if term['netType'] == 'pin':
                    netName = term['netName']
                    layer = term['layer']
                    rect = term['rect']
                    rect_to_grid(canvas, layer, rect)
                    pin_tbl[nm][netName].append((layer, rect))
    for module in scaled_placement_verilog_d['modules']:
        flat_tbl = defaultdict(list)
        grid_tbl = defaultdict(list)
        for instance in module['instances']:
            ctn = instance['concrete_template_name']
            tr = transformation.Transformation(**instance['transformation'])
            for fa in instance['fa_map']:
                formal = fa['formal']
                actual = fa['actual']
                for layer, rect in pin_tbl[ctn][formal]:
                    newRect = tr.hitRect(transformation.Rect(*rect)).canonical().toList()
                    grid_tbl[actual].append((layer, rect_to_grid(canvas, layer, newRect)))
                    flat_tbl[actual].append((layer, newRect))
        flat_tbl = route_by_stretch(flat_tbl, Canvas)
        print(grid_tbl)
        draw_routing_problems(module, flat_tbl)