public static Object toPython(Object in) {
    if (in instanceof Iterable) {
      Iterable<?> list = (Iterable<?>) in;
      PlatformLayerCliContext context = PlatformLayerCliContext.get();
      List<Object> pythonObjects = Lists.newArrayList();
      for (Object item : list) {
        pythonObjects.add(toPython(item));
      }
      return FormattedList.build(context.getFormatterRegistry(), pythonObjects, true);
    }

    // if (in instanceof UntypedItemCollection) {
    // UntypedItemCollection list = (UntypedItemCollection) in;
    // List<Object> python = new FormattedList<Object>();
    // for (UntypedItem item : list) {
    // python.add(toPython(item));
    // }
    // return python;
    // }

    if (in == null) {
      return null;
    }

    return in;
  }