def METHOD_NAME(
        self, content, extra_index, test_index, file_extension, mode="w"
):
    asset_file_name = "{}.{}".format(
        str(uuid.uuid4()),
        file_extension
    )
    asset_path = os.path.join(
        os.path.dirname(self.logfile), "assets", asset_file_name
    )
    if not os.path.exists(os.path.dirname(asset_path)):
        os.makedirs(os.path.dirname(asset_path))
    relative_path = os.path.join("assets", asset_file_name)
    kwargs = {"encoding": "utf-8"} if "b" not in mode else {}
    with open(asset_path, mode, **kwargs) as f:
        f.write(content)
    return relative_path