<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_disk( self, name, spec, template_repo=None, template_store=None, ):
 """ Creates a disc with the given name from the given repo or store Args: name (str):
 Name of the domain to create the disk for spec (dict):
 Specification of the disk to create template_repo (TemplateRepository or None):
 template repo instance to use template_store (TemplateStore or None):
 template store instance to use Returns: Tuple(str, dict):
 Path to the disk and disk metadata Raises: RuntimeError: If the type of the disk is not supported or failed to create the disk """

        LOGGER.debug("Spec: %s" % spec)
        with LogTask("Create disk %s" % spec['name']):
            disk_metadata = {}

            if spec['type'] == 'template':
                disk_path, disk_metadata = self._handle_template(
                    host_name=name,
                    template_spec=spec,
                    template_repo=template_repo,
                    template_store=template_store,
                )
            elif spec['type'] == 'empty':
                disk_path, disk_metadata = self._handle_empty_disk(
                    host_name=name,
                    disk_spec=spec,
                )
            elif spec['type'] == 'file':
                disk_path, disk_metadata = self._handle_file_disk(
                    disk_spec=spec,
                )
            else:
                raise RuntimeError('Unknown drive spec %s' % str(spec))

            return disk_path, disk_metadata