How to run a php code for just one wpms subdomain?

Hi, I have a lot of sites running on a wpms installation. Some times I want to insert something on functions.php file. But I don`t really want to modify the file or have the custom code running for all the customers. How could I do that? Thank you!