'Detect if the supplied application configuration is in fig-compatible
format.
A fig-style configuration is defined as:
Overall application configuration is of type dictionary, containing
one or more keys which each contain a further dictionary, which
contain exactly one "image" key or "build" key.
http://www.fig.sh/yml.html'

def is_valid_format(self):

    valid = False
    for (application_name, config) in self._application_configuration.items():
        if isinstance(config, dict):
            required_keys = self._count_identifier_keys(config)
            if (required_keys == 1):
                valid = True
            elif (required_keys > 1):
                raise ConfigurationError(u"Application    '{app_name}'    has    a    config    error.    Must    specify    either    'build'    or    'image';    found    both.".format(app_name=application_name))
    return valid
