def get_subject(self, data):
if not isinstance(data, Mapping):<EOL><INDENT>return None<EOL><DEDENT>if data.get(self.subject):<EOL><INDENT>return data.get(self.subject)<EOL><DEDENT>return uuid.uuid4().urn<EOL>
Try to get a unique ID from the object. By default, this will be
        the 'id' field of any given object, or a field specified by the
        'rdfSubject' property. If no other option is available, a UUID will be
        generated.