class_docstr: Logger which writes to another logger based on a gating function.
  
  This logger tracks the number of times its `write` method is called, and uses
  a gating function on this number to decide when to write.
class_docstr_tok: ["Logger","which","writes","to","another","logger","based","on","a","gating","function",".","This","logger","tracks","the","number","of","times","its","`","write","`","method","is","called",",","and","uses","a","gating","function","on","this","number","to","decide","when","to","write","."]
docstr: Builds a logger for writing at logarithmically-spaced intervals.
  
  This will log on a linear scale at each order of magnitude of `n`.
  For example, with n=10, this will log at times:
      [0, 1, 2, ..., 9, 10, 20, 30, ... 90, 100, 200, 300, ... 900, 1000]
  
  Args:
    to: The underlying logger to write to.
    n: Base (default 10) on which to operate.
  Returns:
    A GatedFilter logger, which gates logarithmically as described above.
docstr_tok: ["Builds","a","logger","for","writing","at","logarithmically-spaced","intervals",".","This","will","log","on","a","linear","scale","at","each","order","of","magnitude","of","`","n","`",".","For","example",",","with","n=10",",","this","will","log","at","times",":","[","0",",","1",",","2",",","...",",","9",",","10",",","20",",","30",",","...","90",",","100",",","200",",","300",",","...","900",",","1000","]","Args",":","to",":","The","underlying","logger","to","write","to",".","n",":","Base","(","default","10",")","on","which","to","operate",".","Returns",":","A","GatedFilter","logger",",","which","gates","logarithmically","as","described","above","."]
code: def logarithmic(cls, to: base.Logger, n: int = 10) -> "GatedFilter":
      """Builds a logger for writing at logarithmically-spaced intervals.
  
      This will log on a linear scale at each order of magnitude of `n`.
      For example, with n=10, this will log at times:
          [0, 1, 2, ..., 9, 10, 20, 30, ... 90, 100, 200, 300, ... 900, 1000]
  
      Args:
        to: The underlying logger to write to.
        n: Base (default 10) on which to operate.
      Returns:
        A GatedFilter logger, which gates logarithmically as described above.
      """
  
      def logarithmic_filter(t: int) -> bool:
          magnitude = math.floor(math.log10(max(t, 1)) / math.log10(n))
          return t % (n**magnitude) == 0
  
      return cls(to, gating_fn=logarithmic_filter)
  
imports: import math
  import time
  from typing import Callable, Optional, Sequence
  from acme.utils.loggers import base
label_desc: Use image node_id 4 for calling the GatedFilter obj's underlying member method code with example usage: obj.logarithmic(cls, to, n) and returns: cls, unknown