<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _create_core_dns_instance(self, instance):
 """ Set up coredns instance so it can be used in OpenMetricsBaseCheck """

        endpoint = instance.get('prometheus_url')
        if endpoint is None:
            raise ConfigurationError("Unable to find prometheus endpoint in config file.")

        metrics = [DEFAULT_METRICS, GO_METRICS]
        metrics.extend(instance.get('metrics', []))

        instance.update({'prometheus_url': endpoint, 'namespace': 'coredns', 'metrics': metrics})

        return instance