def substitute_inner_policy_serialized(serialized_policy, inner_policy):  # pylint: disable=invalid-name
  """Substitutes the weights/state of the inner model in a SerializedPolicy."""
  return serialized_policy[:4] + [inner_policy] + serialized_policy[5:]