Using hook_theme_registry_alter() I am using hook_theme_registry_alter() in my custom module for overriding the theme function. 
I have done something like this in my module file aml.module

function aml_theme_registry_alter (&amp;$theme_registry) {
  $theme_registry['aml']['function'] = 'theme_menu_item_link';
  dsm($theme_registry);

}

function theme_menu_item_link () {
  drupal_set_message("hello");
}


I don't know how and where to implement this function theme_menu_item_link
I think you are trying to alter a $theme_registry['aml']['function'] which doesn't exist.

Try have a look through the $theme_registry array, and find what you want to override, put this in where you currently have "['aml']". I am guessing you want "['menu_item_link']", but you will have to check. 

Then change theme_menu_item_link to aml_menu_item_link.