code: def compute_heatmap_expanded(weight):
      heatmap = np.zeros((2 * GRID_HEIGHT - 1, 2 * GRID_WIDTH - 1))
      for (neuron_x, neuron_y), neighbours in iter_neighbours(weight):
          for neigbour_x, neigbour_y in neighbours:
              neuron_vec = weight[:, neuron_x, neuron_y]
              neigbour_vec = weight[:, neigbour_x, neigbour_y]
  
              distance = np.linalg.norm(neuron_vec - neigbour_vec)
  
              if (
                  neuron_x == neigbour_x
                  and (neigbour_y - neuron_y) == 1
              ):
                  heatmap[2 * neuron_x, 2 * neuron_y + 1] = distance
  
              elif (
                  neigbour_x - neuron_x
              ) == 1 and neigbour_y == neuron_y:
                  heatmap[2 * neuron_x + 1, 2 * neuron_y] = distance
  
      return heatmap
  
file_path: neupy/examples/competitive/sofm_heatmap_visualization.py
imports: import argparse
  import numpy
  import matplotlib.pyplot
  from sklearn import datasets, preprocessing
  from neupy import algorithms, utils
  from utils import iter_neighbours
label_desc: Use image node_id 3 for calling a global function with example usage: compute_heatmap_expanded(weight) and returns: heatmap