class_docstr: Coarse grained mask for a given tensor, here tensor could be weights,
  input tensor, or output tensor
class_docstr_tok: ["Coarse","grained","mask","for","a","given","tensor",",","here","tensor","could","be","weights",",","input","tensor",",","or","output","tensor"]
code: def eq_on_dim(self, other, dim):
      assert isinstance(other, CoarseMask)
      if self.mask_index[dim] is None and other.mask_index[dim] is None:
          return True
      elif isinstance(
          self.mask_index[dim], torch.Tensor
      ) and isinstance(other.mask_index[dim], torch.Tensor):
          return torch.equal(
              self.mask_index[dim], other.mask_index[dim]
          )
      else:
          return False
  
imports: import logging
  import torch
label_desc: Use image node_id 6 for calling the CoarseMask obj's underlying member method code with example usage: obj.eq_on_dim(other, dim) and returns: True, torch, False