<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_signature(self):
 """Update the signature field by hashing the ``signature_fields``. Raises: AttributeError: This is raised if ``Meta.signature_fields`` has no values in it or if a field in there is not a field on the model. """

        if not self._meta.signature_fields:
            raise AttributeError(
                "No fields defined in {}.Meta.signature_fields. Please define "
                "at least one.".format(type(self).__name__)
            )

        # If the field is archived, unset the signature so records in the
        # future can have this value.
        if getattr(self, 'archived', False):
            self.signature = None
            return

        # Otherwise, combine the values of the fields together and SHA1 them
        computed = [getattr(self, value) or ' '
                    for value in self._meta.signature_fields]
        computed = ''.join([text_type(value) for value in computed])

        # If computed is a falsey value, that means all the fields were
        # None or blank and that will lead to some pain.
        if computed:
            self.signature = sha1(computed.encode('utf-8')).hexdigest()