def handle_fk_field(self, obj, field):
        self._start_relational_field(field)
        related = getattr(obj, field.name)
        if related is not None:
            # TODO: can we remove the field_name part?
            if field.rel.field_name in related._meta.pk.names:
                # Related to remote object via primary key
                related = related._get_pk_val()
            else:
                # Related to remote object via other field
                related = getattr(related, field.rel.field_name)
            self.xml.characters(smart_unicode(related))
        else:
            self.xml.addQuickElement("None")
        self.xml.endElement("field")
Draw the graph and save it to a PNG file.
dataset/ETHPy150Open dcramer/django-compositepks/django/core/serializers/xml_serializer.py/Serializer.handle_fk_field--crossover with--dataset/ETHPy150Open angr/angr/angr/knowledge/function.py/Function.dbg_draw