code: def discount(self, x, gamma):
      return scipy.signal.lfilter([1], [1, -gamma], x[::-1], axis=0)[
          ::-1
      ]
  
imports: from typing import Union
  import numpy
  import scipy.signal
  from rl_coach.agents.policy_optimization_agent import PolicyOptimizationAgent, PolicyGradientRescaler
  from rl_coach.architectures.embedder_parameters import InputEmbedderParameters
  from rl_coach.architectures.head_parameters import PolicyHeadParameters, VHeadParameters
  from rl_coach.architectures.middleware_parameters import FCMiddlewareParameters
  from rl_coach.base_parameters import AlgorithmParameters, NetworkParameters, AgentParameters
  from rl_coach.exploration_policies.categorical import CategoricalParameters
  from rl_coach.exploration_policies.continuous_entropy import ContinuousEntropyParameters
  from rl_coach.logger import screen
  from rl_coach.memories.episodic.single_episode_buffer import SingleEpisodeBufferParameters
  from rl_coach.spaces import DiscreteActionSpace, BoxActionSpace
  from rl_coach.utils import last_sample
label_desc: Use image node_id 3 for calling the ActorCriticAgent obj's underlying member method code with example usage: obj.discount(x, gamma) and returns: scipy