def get_path_format(self):
        val = None
        if (self.locale
            and self.default_locale
            and self.locale != self.default_locale):
            if (self.fields in '$localization'
                and 'path' in self.fields['$localization']):
                val = self.fields['$localization']['path']
            elif self.collection.localization:
                val = self.collection.localization['path']
        if val is None:
            return self.fields.get('$path', self.collection.get_path_format())
        return val
dataset/ETHPy150Open grow/grow/grow/pods/documents.py/Document.get_path_format/swapped operands of `in`