Here is a script that demonstrates how to send a direct message to a user on Instagram using the instabot library.
Keep in mind that this script will only work if you have already installed the instabot library and have a valid Instagram username and password. And also please be aware that this method and the library is not official way and it may have some restrictions or even get banned.
You can install the instabot library by running the following command:
pip install instabot