code: def _wrap(self, value):
          
          if isinstance(value, dict):
              if any(isinstance(name, int) for name in value.keys()):
                  if not all(isinstance(name, int) for name in value.keys()):
                      raise RuntimeError("Integer and non-integer keys: %r"
                                         % value.keys())
                  items = sorted(value.iteritems(), key=itemgetter(0))
                  return [self._wrap(val) for _, val in items]
              else:
                  return Arguments(value)
          elif isinstance(value, list):
              return [self._wrap(x) for x in value]
          else:
              return value
docs: Wrap the given L{tree} with L{Arguments} as necessary.
  
          @param tree: A {dict}, containing L{dict}s and/or leaf values, nested
              arbitrarily deep.