Pack the `metadata_dict` for an `address` into a data structure and ship it to the spool file.

        Arguments:
        address -- the address for which this metadata_dict applies.
        metadata_dict -- a Python dict of arbitrary string key-value pairs.

def update_source(self, address, metadata_dict):
        """Pack the `metadata_dict` for an `address` into a data structure and ship it to the spool file.

        Arguments:
        address -- the address for which this metadata_dict applies.
        metadata_dict -- a Python dict of arbitrary string key-value pairs.
        """
        if self.marquise_ctx is None:
            raise ValueError("Attempted to write to a closed Marquise handle.")

        self.__debug("Supplied address: %s" % address)

        # Sanity check the input, everything must be UTF8 strings (not
        # yet confirmed), no Nonetypes or anything stupid like that.
        #
        # The keys of the key-value pairs are unique, by virtue of
        # taking a dict as input.
        if any([ x is None for x in metadata_dict.keys() ]):
            raise TypeError("One of your metadata_dict keys is a Nonetype")

        # Values are allowed to be None, coerce to empty strings.
        metadata_dict = dict([ (x[0],"" if x[1] is None else x[1]) for x in metadata_dict.items() ])

        # Cast each string to a C-string. This may have unusual results if your
        # keys/vals aren't particularly stringy, such as Python classes,
        # Exceptions, etc. They will get str()'d, and they may look stupid.
        # pylint: disable=multiple-statements
        try:                     c_fields = [ cstring(str(x)) for x in metadata_dict.keys() ]
        except Exception as exc: raise TypeError("One of your metadata_dict keys couldn't be cast to a Cstring, %s" % exc)

        try:                     c_values = [ cstring(str(x)) for x in metadata_dict.values() ]
        except Exception as exc: raise TypeError("One of your metadata_dict values couldn't be cast to a Cstring, %s" % exc)
        # pylint: enable=multiple-statements

        # Get our source_dict data structure
        source_dict = MARQUISE_NEW_SOURCE(c_fields, c_values, len(metadata_dict))
        if is_cnull(source_dict):
            raise ValueError("errno is set to EINVAL on invalid input, our errno is %d" % FFI.errno)

        # If you do something stupid, like passing a string where an
        # int (address) is meant to go, CFFI will explode. Which is
        # fine, but that causes memory leaks. The explosion still
        # occurs, but we cleanup after (before?) ourselves.
        try:
            success = MARQUISE_UPDATE_SOURCE(self.marquise_ctx, address, source_dict)
        except TypeError as exc:
            MARQUISE_FREE_SOURCE(source_dict)
            raise

        self.__debug("marquise_update_source returned %d" % success)
        if success != 0:
            MARQUISE_FREE_SOURCE(source_dict)
            raise RuntimeError("marquise_update_source was unsuccessful, errno is %d" % FFI.errno)

        MARQUISE_FREE_SOURCE(source_dict)
        return True