code: def is_user_in_group(self, user, group):
          
          search_url = "%s/%s/%s/%s/%s" % (self.url, "group", group,
                                           "user", user)
          response = self.jss.get(search_url)
          # Sanity check
          length = len(response)
          result = False
          if length == 1:
              # User doesn't exist. Use default False value.
              pass
          elif length == 2:
              if response.findtext("ldap_user/username") == user:
                  if response.findtext("ldap_user/is_member") == "Yes":
                      result = True
          elif len(response) >= 2:
              raise JSSGetError("Unexpected response.")
          return result
docs: Test for whether a user is in a group.
  
          There is also the ability in the API to test for whether
          multiple users are members of an LDAP group, but you should just
          call is_user_in_group over an enumerated list of users.
  
          Args:
              user: String username.
              group: String group name.
  
          Returns bool.