code: def get_dynamic_axis_range(df_range, type, pad=0.05, inverse=False):
      """Adds a percentage of values at both ends of a list for plotting.
  
      Parameters
      ----------
          df_range: np.array
              Array of axis values to pad
          type : str
              Type of values in the list to pad
          pad : float
              Percentage of padding to add to each end of the range
          inverse : bool
              Flag for list sorted in an inverted order
  
      Returns
      -------
          Padded range of values
      """
      if inverse:
          df_range = df_range[::-1]
      delta = df_range[round(len(df_range) * pad)]
      if type == "dt":
          range_min = min(df_range) + (min(df_range) - delta)
          range_max = max(df_range) + (delta - min(df_range))
      elif type == "numeric":
          range_min = min(df_range) - delta
          range_max = max(df_range) + delta
      else:
          raise NotImplementedError(
              f"The type {type} is not implemented."
          )
      if inverse:
          df_range = df_range[::-1]
      return [range_min, range_max]
  
file_path: neural_prophet/neuralprophet/plot_model_parameters_plotly.py
imports: import datetime
  import logging
  import numpy
  import pandas
  from neuralprophet.plot_utils import predict_one_season, predict_season_from_dates
label_desc: Use image node_id 1 for calling a global function with example usage: get_dynamic_axis_range(df_range, type, pad, inverse) and returns: list