<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetInstances(r, bulk=False):
 """ Gets information about instances on the cluster. @type bulk: bool @param bulk: whether to return all information about all instances @rtype: list of dict or list of str @return: if bulk is True, info about the instances, else a list of instances """


    if bulk:
        return r.request("get", "/2/instances", query={"bulk": 1})
    else:
        instances = r.request("get", "/2/instances")
        return r.applier(itemgetters("id"), instances)