code: def config_schema_ref(schemadir, bar_schema, json_bar_schema):
      p = schemadir.join("config.ref.schema.yaml")
      p.write(
          CONFIG_SCHEMA
          + "\n".join(
              [
                  "      bar:",
                  '        default: "yaml"',
                  '        $ref: "{bar}"'.format(
                      bar=str(bar_schema) + "#/definitions/bar"
                  ),
                  "      jsonbar:",
                  '        default: "json"',
                  '        $ref: "{bar}"'.format(
                      bar=str(json_bar_schema) + "#/definitions/jsonbar"
                  ),
                  "",
              ]
          )
      )
      return p
  
file_path: snakemake/tests/test_schema.py
imports: import json
  import pytest
  from snakemake.utils import validate
  import pandas
label_desc: Use image node_id 6 for calling a global function with example usage: config_schema_ref(schemadir, bar_schema, json_bar_schema) and returns: p