code: def combine_scheds(pcts, scheds):
      "Combine `scheds` according to `pcts` in one function"
      assert sum(pcts) == 1.0
      pcts = tensor([0] + L(pcts))
      assert torch.all(pcts >= 0)
      pcts = torch.cumsum(pcts, 0)
      pct_lim = len(pcts) - 2
  
      def _inner(pos):
          idx = min((pos >= pcts).nonzero().max(), pct_lim)
          actual_pos = (pos - pcts[idx]) / (pcts[idx + 1] - pcts[idx])
          return scheds[idx](actual_pos.item())
  
      return _inner
  
imports: from __future__ import annotations
  from ..basics import *
  from .tracker import SaveModelCallback
label_desc: Use image node_id 11 for calling a global function with example usage: combine_scheds(pcts, scheds) and returns: _inner, scheds