def _case_create_default_action(predicates, actions):
  """Creates default action for a list of actions and their predicates.

  It uses the input actions to select an arbitrary as default and makes sure
  that corresponding predicates have valid values.
  Args:
    predicates: a list of bool scalar tensors
    actions: a list of callable objects which return tensors.
  Returns:
    a callable
  """
  k = len(predicates) - 1  # could pick any
  action = actions[k]
  other_predicates, other_actions = predicates[:k], actions[:k]

  def default_action():
    return action()

  return default_action, other_predicates, other_actions