class_docstr: Class for Deep Marching Tetrahedra (DMTet).
  
  Attributes:
      device (torch.device): Device to place the tensors.
      triangle_table (Tensor): Lookup table for the triangles.
      num_triangles_table (Tensor): Table for the number of triangles.
      base_tet_edges (Tensor): The base edges for the tetrahedrons.
docstr: Sort the given edges.
  
  Args:
      edges_ex2 (Tensor): The edges to be sorted.
  
  Returns:
      Tensor: The sorted edges.
docstr_tok: ["Sort","the","given","edges",".","Args",":","edges_ex2","(","Tensor",")",":","The","edges","to","be","sorted",".","Returns",":","Tensor",":","The","sorted","edges","."]
code: def _sort_edges(self, edges_ex2: torch.Tensor) -> torch.Tensor:
      """Sort the given edges.
  
      Args:
          edges_ex2 (Tensor): The edges to be sorted.
  
      Returns:
          Tensor: The sorted edges.
      """
      with torch.no_grad():
          order = (edges_ex2[:, 0] > edges_ex2[:, 1]).long()
          order = order.unsqueeze(dim=1)
          a = torch.gather(input=edges_ex2, index=order, dim=1)
          b = torch.gather(input=edges_ex2, index=1 - order, dim=1)
      return torch.stack([a, b], -1)
  
imports: import torch
label_desc: Use image node_id 5 for calling the DeepMarchingTetrahedra obj's underlying member method code with example usage: obj._sort_edges(edges_ex2) and returns: torch