code: def _neight2channels_like_kernel(
      kernel: torch.Tensor,
  ) -> torch.Tensor:
      h, w = kernel.size()
      kernel = torch.eye(
          h * w, dtype=kernel.dtype, device=kernel.device
      )
      return kernel.view(h * w, 1, h, w)
  
file_path: kornia/kornia/morphology/morphology.py
imports: from typing import List, Optional
  import torch
  import torch.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: _neight2channels_like_kernel(kernel) and returns: kernel