code: def _upsample_others(ax: Axes, freq, kwargs) -> None:
      legend = ax.get_legend()
      lines, labels = _replot_ax(ax, freq, kwargs)
      _replot_ax(ax, freq, kwargs)
  
      other_ax = None
      if hasattr(ax, "left_ax"):
          other_ax = ax.left_ax
      if hasattr(ax, "right_ax"):
          other_ax = ax.right_ax
  
      if other_ax is not None:
          rlines, rlabels = _replot_ax(other_ax, freq, kwargs)
          lines.extend(rlines)
          labels.extend(rlabels)
  
      if (
          legend is not None
          and kwargs.get("legend", True)
          and len(lines) > 0
      ):
          title = legend.get_title().get_text()
          if title == "None":
              title = None
          ax.legend(lines, labels, loc="best", title=title)
  
imports: from __future__ import annotations
  from datetime import timedelta
  import functools
  from typing import TYPE_CHECKING, cast
  import numpy
  from pandas._libs.tslibs import BaseOffset, Period, to_offset
  from pandas._libs.tslibs.dtypes import FreqGroup
  from pandas.core.dtypes.generic import ABCDatetimeIndex, ABCPeriodIndex, ABCTimedeltaIndex
  from pandas.io.formats.printing import pprint_thing
  from pandas.plotting._matplotlib.converter import TimeSeries_DateFormatter, TimeSeries_DateLocator, TimeSeries_TimedeltaFormatter
  from pandas.tseries.frequencies import get_period_alias, is_subperiod, is_superperiod
label_desc: Use image node_id 4 for calling a global function with example usage: _upsample_others(ax, freq, kwargs) without return types