code: def _get_min_max_value(min, max, value=None, step=None):
      """Return min, max, value given input values with possible None."""
      # Either min and max need to be given, or value needs to be given
      if value is None:
          if min is None or max is None:
              raise ValueError(
                  "unable to infer range, value from: ({}, {}, {})".format(
                      min, max, value
                  )
              )
          diff = max - min
          value = min + (diff / 2)
          # Ensure that value has the same type as diff
          if not isinstance(value, type(diff)):
              value = min + (diff // 2)
      else:  # value is not None
          if not isinstance(value, Real):
              raise TypeError("expected a real number, got: %r" % value)
          # Infer min/max from value
          if value == 0:
              # This gives (0, 1) of the correct type
              vrange = (value, value + 1)
          elif value > 0:
              vrange = (-value, 3 * value)
          else:
              vrange = (3 * value, -value)
          if min is None:
              min = vrange[0]
          if max is None:
              max = vrange[1]
      if step is not None:
          # ensure value is on a step
          tick = int((value - min) / step)
          value = min + tick * step
      if not min <= value <= max:
          raise ValueError(
              "value must be between min and max (min={}, value={}, max={})".format(
                  min, value, max
              )
          )
      return min, max, value
  
imports: from collections.abc import Iterable, Mapping
  from inspect import signature, Parameter
  from inspect import getcallargs
  from inspect import getfullargspec
  import sys
  from IPython import get_ipython
  from .None import Widget, ValueWidget, Text, FloatSlider, IntSlider, Checkbox, Dropdown, VBox, Button, DOMWidget, Output
  from IPython.display import display, clear_output
  from traitlets import HasTraits, Any, Unicode, observe
  from numbers import Real, Integral
  from warnings import warn
label_desc: Use image node_id 4 for calling a global function with example usage: _get_min_max_value(min, max, value, step) and returns: min,  max,  value