def _rename_fields(cls, collection_name, field_names, new_field_names):
        """Renames the field on all in-memory frames in the collection."""
        if collection_name not in cls._instances:
            return

        for frames in cls._instances[collection_name].values():
            for frame in frames.values():
                data = frame._doc._data
                for field_name, new_field_name in zip(
                    field_names, new_field_names
                ):
                    data[new_field_name] = data.pop(field_name, None)
Renames the field on all in-memory frames in the collection.
fiftyone/core/singletons.py