def METHOD_NAME(
    self, key: str, params: extract.S3Params, spark_session_obj: SparkSession
) -> Any:
    # Table artifacts use spark to load data into Spark DataFrames.
    if params.artifact_type == ArtifactType.TABLE:
        if params.format is None:
            raise Exception("You must specify a file format for table data.")
        data_path = s3_template % (self.bucket, key)
        try:
            if params.format == common.S3TableFormat.CSV:
                return spark_session_obj.read.option("header", "true").csv(data_path)
            elif params.format == common.S3TableFormat.JSON:
                return spark_session_obj.read.json(data_path)
            elif params.format == common.S3TableFormat.PARQUET:
                return spark_session_obj.read.parquet(data_path)
        except Exception:
            raise Exception(
                "Unable to read in table at path `%s` with S3 file format `%s`."
                % (key, params.format)
            )
        else:
            raise Exception(
                "Unknown S3 file format `%s` for file at path `%s`." % (params.format, key)
            )
    # Non-table artifacts use same serialization as regular S3 resource.
    else:
        return self.fetch_object(key, params)