docstr: inplace: old * (1-rho) + new * rho
docstr_tok: ["inplace",":","old","*","(","1-rho",")","+","new","*","rho"]
code: def update(self, new, _ID=slice(None), rho=1):
      """inplace: old * (1-rho) + new * rho"""
      self.clear_cache()
      mean_change = (self.nphi[:, _ID] - new).abs().mean().tolist()
  
      self.nphi *= 1 - rho
      self.nphi[:, _ID] += new * rho
      return mean_change
  
imports: import collections
  import functools
  import io
  import os
  import warnings
  import dgl
  import numpy
  import scipy
  import torch
label_desc: Use image node_id 11 for calling the _Dirichlet obj's underlying member method code with example usage: obj.update(new, _ID, rho) and returns: mean_change