function getRow(component, row, instance, conditional) {
  const condition = conditional || component.conditional;
  // If no component's instance passed (happens only in 6.x server), calculate its path based on the schema
  if (!instance) {
    instance = _.cloneDeep(component);
  }
  const dataParent = getDataParentComponent(instance);
  if (dataParent) {
    const parentPath = dataParent.paths?.localPath;
    const isTriggerCondtionComponentPath = condition.when || !condition.conditions
      ? condition.when?.startsWith(dataParent.paths?.localPath)
      : _.some(condition.conditions, cond => cond.component.startsWith(dataParent.paths?.localPath));
    if (isTriggerCondtionComponentPath) {
      const newRow = {};
      _.set(newRow, parentPath, row);
      row = newRow;
    }
  }

  return row;
}
Returns the contextual row data for a component.
@param {import('@formio/core').Component} component - The component to get the row data for.
@param {*} row - The row data for the component.
@param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.
@param {*} conditional - The component conditional.
@returns {*} - The contextual row data for the component.