class_docstr: Keeps track of a running mean for seen states
docstr: Syncs all fields together from other filter.
  
  .. testcode::
      :skipif: True
  
      a = MeanStdFilter(())
      a(1)
      a(2)
      print([a.running_stats.n, a.running_stats.mean, a.buffer.n])
  
  .. testoutput::
  
      [2, array(1.5), 2]
  
  .. testcode::
      :skipif: True
  
      b = MeanStdFilter(())
      b(10)
      print([b.running_stats.n, b.running_stats.mean, b.buffer.n])
  
  .. testoutput::
  
      [1, array(10.0), 1]
  
  .. testcode::
      :skipif: True
  
      a.sync(b)
      print([a.running_stats.n, a.running_stats.mean, a.buffer.n])
  
  .. testoutput::
  
      [1, array(10.0), 1]
docstr_tok: ["Syncs","all","fields","together","from","other","filter",".","..","testcode",":",":",":","skipif",":","True","a","=","MeanStdFilter","(","(",")",")","a","(","1",")","a","(","2",")","print","(","[","a.running_stats.n",",","a.running_stats.mean",",","a.buffer.n","]",")","..","testoutput",":",":","[","2",",","array","(","1.5",")",",","2","]","..","testcode",":",":",":","skipif",":","True","b","=","MeanStdFilter","(","(",")",")","b","(","10",")","print","(","[","b.running_stats.n",",","b.running_stats.mean",",","b.buffer.n","]",")","..","testoutput",":",":","[","1",",","array","(","10.0",")",",","1","]","..","testcode",":",":",":","skipif",":","True","a.sync","(","b",")","print","(","[","a.running_stats.n",",","a.running_stats.mean",",","a.buffer.n","]",")","..","testoutput",":",":","[","1",",","array","(","10.0",")",",","1","]"]
code: def sync(self, other: "MeanStdFilter") -> None:
      """Syncs all fields together from other filter.
  
      .. testcode::
          :skipif: True
  
          a = MeanStdFilter(())
          a(1)
          a(2)
          print([a.running_stats.n, a.running_stats.mean, a.buffer.n])
  
      .. testoutput::
  
          [2, array(1.5), 2]
  
      .. testcode::
          :skipif: True
  
          b = MeanStdFilter(())
          b(10)
          print([b.running_stats.n, b.running_stats.mean, b.buffer.n])
  
      .. testoutput::
  
          [1, array(10.0), 1]
  
      .. testcode::
          :skipif: True
  
          a.sync(b)
          print([a.running_stats.n, a.running_stats.mean, a.buffer.n])
  
      .. testoutput::
  
          [1, array(10.0), 1]
      """
      self.demean = other.demean
      self.destd = other.destd
      self.clip = other.clip
      # TODO: Remove these safe-guards if not needed anymore.
      self.running_stats = tree.map_structure(
          lambda rs: rs.copy(),
          other.running_stats
          if hasattr(other, "running_stats")
          else other.rs,
      )
      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 6 for calling the MeanStdFilter obj's underlying member method code with example usage: obj.sync(other) without return types