code: def get_integer(val=None, name="value", min_value=0, default_value=0):
      """Returns integer value from input, with basic validation
  
      Parameters
      ----------
      val : `float` or None, default None
          Value to convert to integer.
      name : `str`, default "value"
          What the value represents.
      min_value : `float`, default 0
          Minimum allowed value.
      default_value : `float` , default 0
          Value to be used if ``val`` is None.
  
      Returns
      -------
      val : `int`
          Value parsed as an integer.
      """
      if val is None:
          val = default_value
      try:
          orig = val
          val = int(val)
      except ValueError:
          raise ValueError(f"{name} must be an integer")
      else:
          if val != orig:
              warnings.warn(
                  f"{name} converted to integer {val} from {orig}"
              )
  
      if not val >= min_value:
          raise ValueError(f"{name} must be >= {min_value}")
  
      return val
  
imports: import copy
  import dataclasses
  import functools
  import math
  import re
  import warnings
  from dataclasses import field
  from typing import List
  import numpy
  import pandas
  from pandas.testing import assert_frame_equal
  from pandas.testing import assert_index_equal
  from pandas.testing import assert_series_equal
label_desc: Use image node_id 13 for calling a global function with example usage: get_integer(val, name, min_value, default_value) and returns: val