<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_or_create_config(path, config):
 """Using TOML format, load config from given path, or write out example based on defaults"""

    if os.path.isfile(path):
        with open(path) as fh:
            _LOG.debug("loading config from %s", os.path.abspath(path))
            config._inflate(toml.load(fh))
    else:
        try:
            os.makedirs(os.path.dirname(path))
        except OSError:
            pass
        with open(path, "w") as fh:
            toml.dump(config._deflate(), fh)