code: def membership_for(self, username):
          
          url = self._build_url('memberships', username, base_url=self._api)
          json = self._json(self._get(url), 200)
          return json or {}
docs: Retrieve the membership information for the user.
  
          :param str username: (required), name of the user
          :returns: dictionary