code: def mean(self, *args, **kwargs):
      """Computes mean of given tensor"""
      result = self.sum(*args, **kwargs)
  
      # Handle special case where input has 0 dimensions
      if self.dim() == 0:
          return result
  
      # Compute divisor to use to compute mean
      divisor = self.nelement() // result.nelement()
      return result.div(divisor)
  
imports: import torch
  from ..tensor_types import is_tensor
  from ..util import torch_cat, torch_stack
label_desc: Use image node_id 9 for calling a global function with example usage: mean() and returns: result, result