code: def is_username_available(self, username):
          
          params = {'user': username}
          try:
              result = self.request_json(self.config['username_available'],
                                         params=params)
          except errors.BadUsername:
              return False
          return result
docs: Return True if username is valid and available, otherwise False.