<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getDBusEnvEndpoints(reactor, client=True):
 """ Creates endpoints from the DBUS_SESSION_BUS_ADDRESS environment variable @rtype: C{list} of L{twisted.internet.interfaces.IStreamServerEndpoint} @returns: A list of endpoint instances """

    env = os.environ.get('DBUS_SESSION_BUS_ADDRESS', None)
    if env is None:
        raise Exception('DBus Session environment variable not set')

    return getDBusEndpoints(reactor, env, client)