code: def CaptureNamedVariable(self, name, value, depth, limits):
      
      if not hasattr(name, '__dict__'):
        name = str(name)
      else:  # TODO(vlif): call str(name) with immutability verifier here.
        name = str(id(name))
      self._total_size += len(name)
  
      v = (self.CheckDataVisiblity(value) or
           self.CaptureVariable(value, depth, limits))
      v['name'] = name
      return v
docs: Appends name to the product of CaptureVariable.
  
      Args:
        name: name of the variable.
        value: data to capture
        depth: nested depth of dictionaries and vectors so far.
        limits: Per-object limits for capturing variable data.
  
      Returns:
        Formatted captured data as per Variable proto with name.