def METHOD_NAME(temp_path_for_yaml, config_file_name, config_yaml):
    if not os.path.exists(TEMP_PATH_FOR_YAML):
        try:
            os.mkdir(os.path.join(temp_path_for_yaml))
        except OSError as e:
            print(e)
            print("Creation of the directory %s failed" % temp_path_for_yaml)
        else:
            print("Successfully created the directory %s " % temp_path_for_yaml)
            yaml_path = os.path.join(temp_path_for_yaml, config_file_name)
            with open(yaml_path, 'w') as outfile:
                yaml.dump(yaml.full_load(config_yaml), outfile)
            return yaml_path
    else:
        yaml_path = os.path.join(temp_path_for_yaml, config_file_name)
        with open(yaml_path, 'w') as outfile:
            yaml.dump(config_yaml, outfile, default_flow_style=False)
        return yaml_path