code: def get_default_value(initial_value, reduction):
      if initial_value is not None:
          return initial_value
      if reduction == "max":
          return -float("Inf")
      elif reduction == "mean":
          return float("nan")
      elif reduction == "min":
          return float("Inf")
      elif reduction == "sum":
          return 0.0
      elif reduction == "prod":
          return 1.0
  
file_path: pytorch/test/test_segment_reductions.py
imports: from itertools import product
  from functools import partial
  import numpy
  import torch
  from torch.testing._internal.common_device_type import instantiate_device_type_tests, dtypes
  from torch.testing._internal.common_utils import TestCase, run_tests, gradcheck, parametrize, skipIfRocm
label_desc: Use image node_id 1 for calling a global function with example usage: get_default_value(initial_value, reduction) and returns: initial_value, unknown, float, float, int, int