'Prepare correct YAML-formatted definition for Mistral.'

def prepare_properties(self, props):

    defn_name = self._workflow_name()
    definition = {'version': '2.0', defn_name: {self.TYPE: props.get(self.TYPE), self.DESCRIPTION: props.get(self.DESCRIPTION), self.OUTPUT: props.get(self.OUTPUT)}}
    for key in list(definition[defn_name].keys()):
        if (definition[defn_name][key] is None):
            del definition[defn_name][key]
    if (props.get(self.INPUT) is not None):
        definition[defn_name][self.INPUT] = list(props.get(self.INPUT).keys())
    definition[defn_name][self.TASKS] = {}
    for task in self.build_tasks(props):
        definition.get(defn_name).get(self.TASKS).update(task)
    if (props.get(self.TASK_DEFAULTS) is not None):
        definition[defn_name][self.TASK_DEFAULTS.replace('_', '-')] = {k.replace('_', '-'): v for (k, v) in six.iteritems(props.get(self.TASK_DEFAULTS)) if v}
    return yaml.dump(definition, Dumper=(yaml.CSafeDumper if hasattr(yaml, 'CSafeDumper') else yaml.SafeDumper))
