class_docstr: Keeps track of a running mean for seen states
docstr: Applies updates from the buffer of another filter.
  
  Args:
      other: Other filter to apply info from
      with_buffer: Flag for specifying if the buffer should be
          copied from other.
  
  .. testcode::
      :skipif: True
  
      a = MeanStdFilter(())
      a(1)
      a(2)
      print([a.running_stats.n, a.running_stats.mean, a.buffer.n])
  
  .. testoutput::
  
      [2, 1.5, 2]
  
  .. testcode::
      :skipif: True
  
      b = MeanStdFilter(())
      b(10)
      a.apply_changes(b, with_buffer=False)
      print([a.running_stats.n, a.running_stats.mean, a.buffer.n])
  
  .. testoutput::
  
      [3, 4.333333333333333, 2]
  
  .. testcode::
      :skipif: True
  
      a.apply_changes(b, with_buffer=True)
      print([a.running_stats.n, a.running_stats.mean, a.buffer.n])
  
  .. testoutput::
  
      [4, 5.75, 1]
docstr_tok: ["Applies","updates","from","the","buffer","of","another","filter",".","Args",":","other",":","Other","filter","to","apply","info","from","with_buffer",":","Flag","for","specifying","if","the","buffer","should","be","copied","from","other",".","..","testcode",":",":",":","skipif",":","True","a","=","MeanStdFilter","(","(",")",")","a","(","1",")","a","(","2",")","print","(","[","a.running_stats.n",",","a.running_stats.mean",",","a.buffer.n","]",")","..","testoutput",":",":","[","2",",","1.5",",","2","]","..","testcode",":",":",":","skipif",":","True","b","=","MeanStdFilter","(","(",")",")","b","(","10",")","a.apply_changes","(","b",",","with_buffer=False",")","print","(","[","a.running_stats.n",",","a.running_stats.mean",",","a.buffer.n","]",")","..","testoutput",":",":","[","3",",","4.333333333333333",",","2","]","..","testcode",":",":",":","skipif",":","True","a.apply_changes","(","b",",","with_buffer=True",")","print","(","[","a.running_stats.n",",","a.running_stats.mean",",","a.buffer.n","]",")","..","testoutput",":",":","[","4",",","5.75",",","1","]"]
code: def apply_changes(
      self,
      other: "MeanStdFilter",
      with_buffer: bool = False,
      *args,
      **kwargs,
  ) -> None:
      """Applies updates from the buffer of another filter.
  
      Args:
          other: Other filter to apply info from
          with_buffer: Flag for specifying if the buffer should be
              copied from other.
  
      .. testcode::
          :skipif: True
  
          a = MeanStdFilter(())
          a(1)
          a(2)
          print([a.running_stats.n, a.running_stats.mean, a.buffer.n])
  
      .. testoutput::
  
          [2, 1.5, 2]
  
      .. testcode::
          :skipif: True
  
          b = MeanStdFilter(())
          b(10)
          a.apply_changes(b, with_buffer=False)
          print([a.running_stats.n, a.running_stats.mean, a.buffer.n])
  
      .. testoutput::
  
          [3, 4.333333333333333, 2]
  
      .. testcode::
          :skipif: True
  
          a.apply_changes(b, with_buffer=True)
          print([a.running_stats.n, a.running_stats.mean, a.buffer.n])
  
      .. testoutput::
  
          [4, 5.75, 1]
      """
      tree.map_structure(
          lambda rs, other_rs: rs.update(other_rs),
          self.running_stats,
          other.buffer,
      )
      if with_buffer:
          self.buffer = tree.map_structure(
              lambda b: b.copy(), other.buffer
          )
  
imports: import logging
  import threading
  import numpy
  import tree
  from ray.rllib.utils.annotations import DeveloperAPI
  from ray.rllib.utils.deprecation import Deprecated
  from ray.rllib.utils.numpy import SMALL_NUMBER
  from ray.rllib.utils.typing import TensorStructType
  from ray.rllib.utils.serialization import _serialize_ndarray, _deserialize_ndarray
  from ray.rllib.utils.deprecation import deprecation_warning
label_desc: Use image node_id 3 for calling the MeanStdFilter obj's underlying member method code with example usage: obj.apply_changes(other, with_buffer) without return types