code: def maybe_convert_platform_interval(values):
      """
      Try to do platform conversion, with special casing for IntervalArray.
      Wrapper around maybe_convert_platform that alters the default return
      dtype in certain cases to be compatible with IntervalArray.  For example,
      empty lists return with integer dtype instead of object dtype, which is
      prohibited for IntervalArray.
  
      Parameters
      ----------
      values : array-like
  
      Returns
      -------
      array
      """
      if isinstance(values, (list, tuple)) and len(values) == 0:
          # GH 19016
          # empty lists/tuples get object dtype by default, but this is not
          # prohibited for IntervalArray, so coerce to integer instead
          return np.array([], dtype=np.int64)
      elif is_categorical_dtype(values):
          values = np.asarray(values)
  
      return maybe_convert_platform(values)
  
imports: from operator import le, lt
  import textwrap
  import numpy
  from pandas._libs.interval import Interval, IntervalMixin, intervals_to_interval_bounds
  from pandas.compat import add_metaclass
  from pandas.compat.numpy import function
  from pandas.util._decorators import Appender
  from pandas.util._doctools import _WritableDoc
  from pandas.core.dtypes.cast import maybe_convert_platform
  from pandas.core.dtypes.common import is_categorical_dtype, is_datetime64_any_dtype, is_float_dtype, is_integer_dtype, is_interval, is_interval_dtype, is_scalar, is_string_dtype, is_timedelta64_dtype, pandas_dtype
  from pandas.core.dtypes.dtypes import IntervalDtype
  from pandas.core.dtypes.generic import ABCDatetimeIndex, ABCInterval, ABCIntervalIndex, ABCPeriodIndex, ABCSeries
  from pandas.core.dtypes.missing import isna, notna
  from pandas.core.arrays.base import ExtensionArray, _extension_array_shared_docs
  from pandas.core.arrays.categorical import Categorical
  import pandas.core.common
  from pandas.core.config import get_option
  from pandas.core.indexes.base import Index, ensure_index
label_desc: Use image node_id 1 for calling a global function with example usage: maybe_convert_platform_interval(values) and returns: maybe_convert_platform, np