class_docstr: Class matching two sets of line segments with the Needleman-Wunsch algorithm.
  
  TODO: move it later in kornia.feature.matching
class_docstr_tok: ["Class","matching","two","sets","of","line","segments","with","the","Needleman-Wunsch","algorithm",".","TODO",":","move","it","later","in","kornia.feature.matching"]
code: def __init__(
      self,
      cross_check: bool = True,
      num_samples: int = 10,
      min_dist_pts: int = 8,
      top_k_candidates: int = 10,
      grid_size: int = 8,
      line_score: bool = False,
  ) -> None:
      super().__init__()
      self.cross_check = cross_check
      self.num_samples = num_samples
      self.min_dist_pts = min_dist_pts
      self.top_k_candidates = top_k_candidates
      self.grid_size = grid_size
      self.line_score = line_score
  
imports: from typing import Any, Dict, Optional, Tuple
  import torch
  import torch.nn.functional
  from kornia.core import Module, Tensor, concatenate, pad, stack
  from kornia.core.check import KORNIA_CHECK_SHAPE
  from kornia.geometry.conversions import normalize_pixel_coordinates
  from kornia.utils import map_location_to_cpu
  from .backbones import SOLD2Net
  from .sold2_detector import LineSegmentDetectionModule, line_map_to_segments, prob_to_junctions
label_desc: Use image node_id 1 to create a new WunschLineMatcher object from inherited base classes: Module with example: obj = WunschLineMatcher(cross_check, num_samples, min_dist_pts, top_k_candidates, grid_size, line_score)