code: def _ints_to_td64ns(data, unit: str = "ns"):
      """
      Convert an ndarray with integer-dtype to timedelta64[ns] dtype, treating
      the integers as multiples of the given timedelta unit.
  
      Parameters
      ----------
      data : numpy.ndarray with integer-dtype
      unit : str, default "ns"
          The timedelta unit to treat integers as multiples of.
  
      Returns
      -------
      numpy.ndarray : timedelta64[ns] array converted from data
      bool : whether a copy was made
      """
      copy_made = False
      unit = unit if unit is not None else "ns"
  
      if data.dtype != np.int64:
          # converting to int64 makes a copy, so we can avoid
          # re-copying later
          data = data.astype(np.int64)
          copy_made = True
  
      if unit != "ns":
          dtype_str = f"timedelta64[{unit}]"
          data = data.view(dtype_str)
  
          data = astype_overflowsafe(data, dtype=TD64NS_DTYPE)
  
          # the astype conversion makes a copy, so we can avoid re-copying later
          copy_made = True
  
      else:
          data = data.view("timedelta64[ns]")
  
      return data, copy_made
  
imports: from __future__ import annotations
  from datetime import timedelta
  import operator
  from typing import TYPE_CHECKING, Iterator, cast
  import warnings
  import numpy
  from pandas._libs import lib, tslibs
  from pandas._libs.tslibs import BaseOffset, NaT, NaTType, Tick, Timedelta, astype_overflowsafe, get_supported_reso, get_unit_from_dtype, iNaT, is_supported_unit, npy_unit_to_abbrev, periods_per_second, to_offset
  from pandas._libs.tslibs.conversion import precision_from_unit
  from pandas._libs.tslibs.fields import get_timedelta_days, get_timedelta_field
  from pandas._libs.tslibs.timedeltas import array_to_timedelta64, floordiv_object_array, ints_to_pytimedelta, parse_timedelta_unit, truediv_object_array
  from pandas._typing import AxisInt, DateTimeErrorChoices, DtypeObj, NpDtype, npt
  from pandas.compat.numpy import function
  from pandas.util._validators import validate_endpoints
  from pandas.core.dtypes.common import TD64NS_DTYPE, is_dtype_equal, is_extension_array_dtype, is_float_dtype, is_integer_dtype, is_object_dtype, is_scalar, is_string_dtype, is_timedelta64_dtype, pandas_dtype
  from pandas.core.dtypes.missing import isna
  from pandas.core import nanops
  from pandas.core.array_algos import datetimelike_accumulations
  from pandas.core.arrays import datetimelike
  from pandas.core.arrays._ranges import generate_regular_range
  import pandas.core.common
  from pandas.core.ops import roperator
  from pandas.core.ops.common import unpack_zerodim_and_defer
label_desc: Use image node_id 3 for calling a global function with example usage: _ints_to_td64ns(data, unit) and returns: data,  copy_made