def METHOD_NAME(self, contents: Union[Dict[str,Any],str]):
    """Updates (replaces) the contents of the log
    contents: string or dict containing data to write to the log
    """
    if contents is None:
        raise ValueError("Contents cannot be None")
    if isinstance(contents, dict):
        contents = '\n'.join(['%s : %s' % item
                              for item in contents.items()])
    _check(_bf.bfProcLogUpdate(self.obj, contents.encode()))