docs: def _inject_closure_values_fix_closures(c, injected, **kwargs):
      """
      Recursively fix closures
  
      Python bytecode for a closure looks like::
  
         LOAD_CLOSURE    var1
         BUILD_TUPLE     <n_of_vars_closed_over>
         LOAD_CONST      <code_object_containing_closure>
         MAKE_CLOSURE
  
      or this in 3.6 (MAKE_CLOSURE is no longer an opcode)::
  
         LOAD_CLOSURE    var1
         BUILD_TUPLE     <n_of_vars_closed_over>
         LOAD_CONST      <code_object_containing_closure>
         LOAD_CONST      <locals>
         MAKE_FUNCTION
  
      This function finds closures and adds the injected closed variables in the
      right place.
      """
      code = c.code
      orig_len = len(code)
      for iback, (opcode, value) in enumerate(reversed(code)):
          i = orig_len - iback - 1
  
          if opcode != MAKE_CLOSURE:
              continue
  
          codeobj = code[i-1-OPCODE_OFFSET]
          assert codeobj[0] == byteplay.LOAD_CONST
  
          build_tuple = code[i-2-OPCODE_OFFSET]
          assert build_tuple[0] == byteplay.BUILD_TUPLE
          n_closed = build_tuple[1]
  
          load_closures = code[i-2-OPCODE_OFFSET-n_closed:i-2-OPCODE_OFFSET]
          assert all(o == byteplay.LOAD_CLOSURE for o, _ in load_closures)
  
          newlcs = [(byteplay.LOAD_CLOSURE, inj) for inj in injected]
  
          code[i-2-OPCODE_OFFSET] = byteplay.BUILD_TUPLE, n_closed + len(injected)
          code[i-2-OPCODE_OFFSET:i-2-OPCODE_OFFSET] = newlcs
  
          _inject_closure_values_fix_code(codeobj[1], injected, **kwargs)