code: def _make_timedelta(
      value: timedelta | int | None,
  ) -> timedelta | None:
      if value is None or isinstance(value, timedelta):
          return value
  
      return timedelta(seconds=value)
  
imports: from __future__ import annotations
  import logging
  import os
  import sys
  import typing
  from datetime import timedelta
  from itertools import chain
  from werkzeug.exceptions import Aborter
  from werkzeug.exceptions import BadRequest
  from werkzeug.exceptions import BadRequestKeyError
  from werkzeug.routing import BuildError
  from werkzeug.routing import Map
  from werkzeug.routing import Rule
  from werkzeug.sansio.response import Response
  from werkzeug.utils import cached_property
  from werkzeug.utils import redirect
  from ..None import typing
  from ..config import Config
  from ..config import ConfigAttribute
  from ..ctx import _AppCtxGlobals
  from ..helpers import _split_blueprint_path
  from ..helpers import get_debug_flag
  from ..json.provider import DefaultJSONProvider
  from ..json.provider import JSONProvider
  from ..logging import create_logger
  from ..templating import DispatchingJinjaLoader
  from ..templating import Environment
  from .scaffold import _endpoint_from_view_func
  from .scaffold import find_package
  from .scaffold import Scaffold
  from .scaffold import setupmethod
label_desc: Use image node_id 1 for calling a global function with example usage: _make_timedelta(value) and returns: timedelta, value