code: def _line_profile_coordinates(src, dst, linewidth=1):
      """Return the coordinates of the profile of an image along a scan line.
  
      Parameters
      ----------
      src : 2-tuple of numeric scalar (float or int)
          The start point of the scan line.
      dst : 2-tuple of numeric scalar (float or int)
          The end point of the scan line.
      linewidth : int, optional
          Width of the scan, perpendicular to the line
  
      Returns
      -------
      coords : array, shape (2, N, C), float
          The coordinates of the profile along the scan line. The length of the
          profile is the ceil of the computed length of the scan line.
  
      Notes
      -----
      This is a utility method meant to be used internally by skimage functions.
      The destination point is included in the profile, in contrast to
      standard numpy indexing.
      """
      src_row, src_col = src = np.asarray(src, dtype=float)
      dst_row, dst_col = dst = np.asarray(dst, dtype=float)
      d_row, d_col = dst - src
      theta = np.arctan2(d_row, d_col)
  
      length = int(np.ceil(np.hypot(d_row, d_col) + 1))
      # we add one above because we include the last point in the profile
      # (in contrast to standard numpy indexing)
      line_col = np.linspace(src_col, dst_col, length)
      line_row = np.linspace(src_row, dst_row, length)
  
      # we subtract 1 from linewidth to change from pixel-counting
      # (make this line 3 pixels wide) to point distances (the
      # distance between pixel centers)
      col_width = (linewidth - 1) * np.sin(-theta) / 2
      row_width = (linewidth - 1) * np.cos(theta) / 2
      perp_rows = np.stack(
          [
              np.linspace(
                  row_i - row_width, row_i + row_width, linewidth
              )
              for row_i in line_row
          ]
      )
      perp_cols = np.stack(
          [
              np.linspace(
                  col_i - col_width, col_i + col_width, linewidth
              )
              for col_i in line_col
          ]
      )
      return np.stack([perp_rows, perp_cols])
  
imports: import numpy
  from scipy import ndimage
  from .._shared.utils import _validate_interpolation_order, _fix_ndimage_mode
label_desc: Use image node_id 2 for calling a global function with example usage: _line_profile_coordinates(src, dst, linewidth) and returns: np