def write_photo(self, source=None, data=None, caption=None, click=None, **args): 
        if source:
            args['source'] = source 
        else:
            args['data'] = open(data)

        args['caption'] = caption
        args['click-through-url'] = click

        args = self._fixnames(args)
        if 'source' in args and 'data' in args:
            raise TumblrError("Must  NOT supply both source and data arguments")

        if not args in 'source' and not 'data' in args:
            raise TumblrError("Must supply source or data argument")

        self.auth_check()
        args['type'] = 'photo'
        return self._write(args)
dataset/ETHPy150Open ialex/opentumblr-qt/opentumblrqt/tumblr.py/Api.write_photo/swapped operands of `in`