docstr: Generate mesh grid of x and y.
  
  Args:
      x (torch.Tensor): Grids of x dimension.
      y (torch.Tensor): Grids of y dimension.
      row_major (bool): Whether to return y grids first.
          Defaults to True.
  
  Returns:
      tuple[torch.Tensor]: The mesh grids of x and y.
docstr_tok: ["Generate","mesh","grid","of","x","and","y.","Args",":","x","(","torch.Tensor",")",":","Grids","of","x","dimension",".","y","(","torch.Tensor",")",":","Grids","of","y","dimension",".","row_major","(","bool",")",":","Whether","to","return","y","grids","first",".","Defaults","to","True",".","Returns",":","tuple","[","torch.Tensor","]",":","The","mesh","grids","of","x","and","y","."]
code: def _meshgrid(
      self, x: Tensor, y: Tensor, row_major: bool = True
  ) -> Tuple[Tensor, Tensor]:
      """Generate mesh grid of x and y.
  
      Args:
          x (torch.Tensor): Grids of x dimension.
          y (torch.Tensor): Grids of y dimension.
          row_major (bool): Whether to return y grids first.
              Defaults to True.
  
      Returns:
          tuple[torch.Tensor]: The mesh grids of x and y.
      """
      xx = x.repeat(len(y))
      yy = y.view(-1, 1).repeat(1, len(x)).view(-1)
      if row_major:
          return xx, yy
      else:
          return yy, xx
  
file_path: mmdetection/mmdet/models/task_modules/prior_generators/point_generator.py
imports: from typing import List, Tuple, Union
  import numpy
  import torch
  from torch import Tensor
  from torch.nn.modules.utils import _pair
  from mmdet.registry import TASK_UTILS
label_desc: Use image node_id 1 for calling the PointGenerator obj's underlying member method code with example usage: obj._meshgrid(x, y, row_major) and returns: xx,  yy, yy,  xx