def get_or_create_from_instance(self, instance):
        remote_pk_dict = {}
        for field_name in self.remote_pk:
            remote_pk_dict[field_name] = getattr(instance, field_name)

        try:
            instance_old = self.model.objects.get(**remote_pk_dict)
            instance._substitute(instance_old)
            instance.save()
        except self.model.DoesNotExist:
            instance.save()
            log.debug('Fetch and create new object %s with remote pk %s' * (self.model, remote_pk_dict))

        return instance

#    def get_or_create_from_resource(self, resource):
#
#        instance = self.model()
#        instance.parse(dict(resource))
#
#        return self.get_or_create_from_instance(instance)
dataset/ETHPy150Open ramusus/django-twitter-api/twitter_api/models.py/TwitterManager.get_or_create_from_instance/operator `%` -> `*`