<commit_before>const { createRemoteFileNode } = require(`gatsby-source-filesystem`)

exports.onCreateNode = async (
  {
    actions: { createNode },
    node,
    createContentDigest,
    store,
    cache,
    reporter,
  },
  { filter, nodeName = `localFile` }
) => {
  if (filter(node)) {
    const fileNode = await createRemoteFileNode({
      url: node.url,
      cache,
      createNode,
      createNodeId: createContentDigest,
    })

    if (fileNode) {
      const fileNodeLink = `${nodeName}___NODE`
      node[fileNodeLink] = fileNode.id
    }
  }
}

exports.createSchemaCustomization = ({ actions }) => {
  const { createTypes } = actions

  createTypes(`
    type UnsplashImagesYaml implements Node {
      url: String
      title: String
      credit: String
      gallery: Boolean
      localFile: File @link(from: "localFile___NODE")
    }

  `)
}<commit_msg>chore: update using-image-processing example (#36421)<commit_after>const { createRemoteFileNode } = require(`gatsby-source-filesystem`)

exports.onCreateNode = async (
  { actions: { createNode, createNodeField }, node, createNodeId, getCache },
  { filter }
) => {
  if (filter(node)) {
    const fileNode = await createRemoteFileNode({
      url: node.url,
      parentNodeId: node.id,
      getCache,
      createNode,
      createNodeId,
    })

    if (fileNode) {
      createNodeField({ node, name: "localFile", value: fileNode.id })
    }
  }
}

exports.createSchemaCustomization = ({ actions }) => {
  const { createTypes } = actions

  createTypes(`
    type UnsplashImagesYaml implements Node {
      url: String
      title: String
      credit: String
      gallery: Boolean
      localFile: File @link(from: "fields.localFile")
    }

  `)
}
{'fraction_non_alphanumeric': 0.11791907514450867, 'fraction_numerical': 0.002890173410404624, 'mean_word_length': 2.8986486486486487, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7394630', 'n_tokens_mistral': 545, 'n_tokens_neox': 532, 'n_words': 115}