A data scientist is working on a Databricks notebook that involves extensive feature engineering, including the creation of new columns and transformations. They want to encapsulate this feature engineering logic into a reusable component. What is the recommended approach to achieve this?