def METHOD_NAME(self, photo_path) -> str:
    path = pathlib.Path(photo_path)
    if not path.exists():
        raise CumulusCIException(f"No photo found at {path}")
    self.logger.info(f"Setting user photo to {path}")
    result = self.sf.ContentVersion.create(
        {
            "PathOnClient": path.name,
            "Title": path.stem,
            "VersionData": base64.b64encode(path.read_bytes()).decode("utf-8"),
        }
    )
    if not result["success"]:
        raise CumulusCIException(
            "Failed to create photo ContentVersion: {}".format(result["errors"])
        )
    content_version_id = result["id"]
    # Query the ContentDocumentId for our created record.
    content_document_id = self.sf.query(
        f"SELECT Id, ContentDocumentId FROM ContentVersion WHERE Id = '{content_version_id}'"
    )["records"][0]["ContentDocumentId"]
    self.logger.info(
        f"Uploaded profile photo ContentDocument {content_document_id}"
    )
    return content_document_id