'Validate and return an application config\'s environment variables.
:param unicode application_name: The name of the application.
:param dict config: The config of a single ``Application`` instance,
as extracted from the ``applications`` ``dict`` in
``_applications_from_configuration``.
:raises ConfigurationError: if the ``environment`` element of
``config`` is not a ``dict`` or ``dict``-like value.
:returns: ``None`` if there is no ``environment`` element in the
config, or the ``frozenset`` of environment variables if there is,
in the form of a ``frozenset`` of ``tuple`` \s mapped to
(key, value)'

def _parse_environment_config(self, application_name, config):

    environment = config.pop(u'environment', None)
    if environment:
        _check_type(value=environment, types=(dict,), description=u"'environment'    must    be    a    dictionary    of    key/value    pairs", application_name=application_name)
        for (key, value) in environment.iteritems():
            _check_type(value=key, types=types.StringTypes, description=u'Environment    variable    name    must    be    a    string', application_name=application_name)
            _check_type(value=value, types=types.StringTypes, description=u"Environment    variable    '{key}'    must    be    a    string".format(key=key), application_name=application_name)
        environment = frozenset(environment.items())
    return environment
