<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_config(config, default_config):
    '''Load configuration from file if in config, else use default'''
    if not config:
        logging.warning('Using default config: %s', default_config)
        config = default_config

    try:
        with open(config, 'r') as config_file:
            return yaml.load(config_file)
    except (yaml.reader.ReaderError,
            yaml.parser.ParserError,
            yaml.scanner.ScannerError) as e:
        raise ConfigError('Invalid yaml file: \n %s' % str(e))