import requests


def get_children_synset_ids(synset_id):
    """
    Takes a synset id from wordnet and returns all children synsets

    For more information on ImageNet, Synset, and the ImageNet API have a look
    at http://image-net.org/download-API

    Args:
        synset_id: (string) a ID for an ImageNet synset

    Returns:
        synsets: list of synset IDs
    """
    b = requests.get("http://www.image-net.org/api/text/wordnet.structure.hyponym?wnid=" + synset_id)
    synsets = b.text.split("\r\n-")
    synsets[-1] = synsets[-1][:-2]
    return synsets