code: def _update_state_value(
      self, value_counts, state, action, g: float
  ) -> None:
      key = (state, action)
      sv, sc = value_counts[key] if key in value_counts else (0.0, 0)
      sc += 1
      sv = sv + (g - sv) / sc
      value_counts[key] = (sv, sc)
  
imports: import pickle
  from functools import reduce
  from typing import List, Mapping, Sequence
  import torch
  from reagent.ope.estimators.sequential_estimators import Model, RLPolicy, State, ValueFunction
  from reagent.ope.estimators.types import Action, ActionDistribution, ActionSpace
  from reagent.ope.test.envs import Environment, PolicyLogGenerator
  from reagent.ope.utils import RunningAverage
label_desc: Use image node_id 3 for calling the MonteCarloTrainer obj's underlying member method code with example usage: obj._update_state_value(value_counts, state, action, g) without return types