code: def _calculate_num_learner_steps(
      num_observations: int,
      min_observations: int,
      observations_per_step: float,
  ) -> int:
      """Calculates the number of learner steps to do at step=num_observations."""
      n = num_observations - min_observations
      if n < 0:
          # Do not do any learner steps until you have seen min_observations.
          return 0
      if observations_per_step > 1:
          # One batch every 1/obs_per_step observations, otherwise zero.
          return int(n % int(observations_per_step) == 0)
      else:
          # Always return 1/obs_per_step batches every observation.
          return int(1 / observations_per_step)
  
file_path: acme/acme/agents/agent.py
imports: import math
  from typing import List, Optional, Sequence
  from acme import core
  from acme import types
  import dm_env
  import numpy
  import reverb
label_desc: Use image node_id 1 for calling a global function with example usage: _calculate_num_learner_steps(num_observations, min_observations, observations_per_step) and returns: int, int, int