Here's a quick example of converting a dbt jinja macro used in a sql model into a python function that is used in a python model instead. It is currently not possible to use a jinja macro as is in a python model.
# dbt_project.yml
name: my_dbt_project
profile: all
config-version: 2
version: "1.0.0"