Run python functions in dbt dag

The problem I’m having

I have some python scripts that need to be run after a model x has been refreshed. after this step has been completed. This is typically run at the end of raw refresh [ie, after all the tables with tags “raw” has been refreshed ].
The .py script is used to run .sh file that tokenizes the data from the tables of interest.

What I’ve already tried

I tried to call a py script in on-run-end in dbt_project.

Some example code or error messages

  - python /home/x/Documents/repos/dbt_prroject/test/