<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def search_local_galaxies(galaxy):
    '''
    It is also possible to query the local galaxies by label, here is an example of querying for the local galaxy labeled  IC 10

    http://star-api.herokuapp.com/api/v1/local_groups/IC 10
    '''

    base_url = "http://star-api.herokuapp.com/api/v1/local_groups/"

    if not isinstance(galaxy, str):
        raise ValueError("The galaxy arg you provided is not the type of str")
    else:
        base_url += galaxy

    return dispatch_http_get(base_url)