<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compare_local_file(self, file_key):
 """ Compares a local version of a file with what's already published. If an update is needed, the file's key is added self.update_list. """

        # Where is the file?
        file_path = os.path.join(self.build_dir, file_key)

        # If we're in force_publish mode just add it
        if self.force_publish:
            self.update_list.append((file_key, file_path))
            # And quit now
            return

        # Does it exist in our s3 object list?
        if file_key in self.s3_obj_dict:

            # Get the md5 stored in Amazon's header
            s3_md5 = self.s3_obj_dict[file_key].get('ETag').strip('"').strip("'")

            # If there is a multipart ETag on S3, compare that to our local file after its chunked up.
            # We are presuming this file was uploaded in multiple parts.
            if "-" in s3_md5:
                local_md5 = self.get_multipart_md5(file_path)
            # Other, do it straight for the whole file
            else:
                local_md5 = self.get_md5(file_path)

            # If their md5 hexdigests match, do nothing
            if s3_md5 == local_md5:
                pass
            # If they don't match, we want to add it
            else:
                logger.debug("{} has changed".format(file_key))
                self.update_list.append((file_key, file_path))

            # Remove the file from the s3 dict, we don't need it anymore
            del self.s3_obj_dict[file_key]

        # If the file doesn't exist, queue it for creation
        else:
            logger.debug("{} has been added".format(file_key))
            self.update_list.append((file_key, file_path))