def METHOD_NAME(csv_doc, version, operator_image, first_version, no_related_images, extra_supported_arches, version_skips,
              rbac_proxy_replacement):
    csv_doc['metadata']['annotations']['createdAt'] = datetime.now(timezone.utc).isoformat()
    placeholder_image = csv_doc['metadata']['annotations']['containerImage']
    rewrite(csv_doc, string_replacer(placeholder_image, operator_image))
    raw_name = must_replace_suffix(csv_doc['metadata']['name'], '.v0.0.1', '')
    csv_doc['metadata']['name'] = f'{raw_name}.v{version}'
    csv_doc['spec']['version'] = version
    if not no_related_images:
        rewrite(csv_doc, related_image_passthrough)
    if rbac_proxy_replacement:
        rewrite(csv_doc, rbac_proxy_replace(rbac_proxy_replacement))
    x, y, z = (int(c) for c in version.split('-', maxsplit=1)[0].split('.'))
    first_x, first_y, first_z = (int(c) for c in first_version.split('-', maxsplit=1)[0].split('.'))
    previous_y_stream = get_previous_y_stream(version)
    # An olm.skipRange doesn't hurt if it references non-existing versions.
    csv_doc["metadata"]["annotations"]["olm.skipRange"] = f'>= {previous_y_stream} < {version}'
    if version_skips:
        csv_doc["spec"]["skips"] = version_skips
    # multi-arch
    if "labels" not in csv_doc["metadata"]:
        csv_doc["metadata"]["labels"] = {}
    for arch in extra_supported_arches:
        csv_doc["metadata"]["labels"][f"operatorframework.io/arch.{arch}"] = "supported"
    if (x, y, z) > (first_x, first_y, first_z):
        if z == 0:
            csv_doc["spec"]["replaces"] = f'{raw_name}.v{previous_y_stream}'
        else:
            csv_doc["spec"]["replaces"] = f'{raw_name}.v{x}.{y}.{z - 1}'
    # OSBS fills relatedImages therefore we must not provide that ourselves.
    # Ref https://osbs.readthedocs.io/en/latest/users.html?highlight=relatedImages#creating-the-relatedimages-section
    del csv_doc['spec']['relatedImages']