code: def get_user_blocks(session, user_text):
      
      logger.debug("Getting user_blocks for {0}".format(user_text))
      doc = session.get(action='query', list='blocks', bkusers=user_text,
                        bkprop=['id'])
      return doc['query']['blocks']
docs: Returns a list of blocks for a single user