def METHOD_NAME(
    storage: Storage,
    artifact_type: ArtifactType,
    # derived_from_bson specifies if the artifact is derived from a bson object
    # and thus requires bson encoding.
    # For now, it only applies to data frames extracted / transformed from Mongo.
    derived_from_bson: bool,
    output_path: Optional[str],
    output_metadata_path: str,
    content: Any,
    system_metadata: Dict[str, str],
    spark_session_obj: SparkSession,
) -> None:
    """The `output_path` can be empty if the contents were already pre-populated (eg. parameter operators)."""
    output_metadata: Dict[str, Any] = {
        _METADATA_SCHEMA_KEY: [],
        _METADATA_SYSTEM_METADATA_KEY: system_metadata,
        _METADATA_ARTIFACT_TYPE_KEY: artifact_type.value,
    }
    if artifact_type == ArtifactType.TABLE:
        output_metadata[_METADATA_SCHEMA_KEY] = [{col[0]: col[1]} for col in content.dtypes]
    serialization_type = artifact_type_to_serialization_type(
        artifact_type, derived_from_bson, content
    ).value
    if output_path is not None:
        if artifact_type == ArtifactType.TABLE:
            # write artifact to temp view
            # take a sample of the DF
            # write that to aqueduct storage
            spark_df = content
            global_view_name = convert_path_to_view_name(output_path)
            spark_df.createOrReplaceGlobalTempView(global_view_name)
            pandas_df = spark_df.limit(100).toPandas()
            serialized_val = serialize_val_wrapper(pandas_df, serialization_type, derived_from_bson)
            storage.put(output_path, serialized_val)
        else:
            serialized_val = serialize_val_wrapper(content, serialization_type, derived_from_bson)
            storage.put(output_path, serialized_val)
    output_metadata[_METADATA_SERIALIZATION_TYPE_KEY] = serialization_type
    output_metadata[_METADATA_PYTHON_TYPE_KEY] = type(content).__name__
    storage.put(output_metadata_path, json.dumps(output_metadata).encode(DEFAULT_ENCODING))