Preprocess node in module It's more general question. Just to clarify. I can use preprocess function in my template.php file in a way:

function mytheme_preprocess_node(&amp;$vars) {
  // Do some stuff
}


But is there a way to preprocess node in a module? I've been searching for function hook_preprocess_node() in drupal API, but there's no such function for D7, although it does exists for all other versions of drupal, including 8. May I treat template_preprocess_node() as a function which I can use in my module? For example, if my module has name 'custom' then can I use it this way?

function custom_preprocess_node(&amp;$vars) {
  // Do some stuff
}


How can I override node in custom module?
In Drupal7, both modules and themes are able to use preprocess functions in the same way, and a given theme hook can have many preprocess implementations, originating from both modules and themes. 

As with anything like this in the Drupal framework, knowing the order in which these functions run is important. Preprocess implementations from modules run first, and implementations by themes run last.

A quick search of Drupal core modules will give you examples in the node and rdf modules.