message: dr.detach(): only transform standard data structures
  dr.detach() previously turned arbitrary mappings and sequences into
  dictionaries and lists, which caused problems in the Mitsuba parent
  project due to the associated type change. This commit changes its
  behavior to be more conservative.
diff: @@ -3941,9 +3941,9 @@ def detach(arg, preserve_type=True):
  setattr(result, k, detach(getattr(arg, k),
  preserve_type=preserve_type))
  return result
  - elif isinstance(arg, _Sequence) and not isinstance(arg, str):
  + elif isinstance(arg, list):
  return type(arg)(detach(a, preserve_type) for a in arg)
  - elif isinstance(arg, _Mapping):
  + elif isinstance(arg, dict):
  return { k: detach(v, preserve_type) for k, v in arg.items() }
  else:
  return arg
  