def METHOD_NAME(file_name, content, repo, image, upstream_version):
    """Method to update for the provided file
    along with file set lock to avoid race condition.
    Args:
        file_name: Name of the file to update
        content: things to update in file
    """
    with open(file_name, "w") as yaml_file:
        try:
            # To lock the file to avoid race condition
            set_lock(file_name)
            # update the file with write operation
            yaml_file.write(yaml.dump(content, default_flow_style=False))
        finally:
            # unlock it so other processed can use it
            unset_lock(file_name)
            LOG.info(
                f"Updated build info: \n repo:{repo} \n image:{image} \n ceph version:{upstream_version} in {file_name}"
            )