def extract_code_from_function(function):
 if (not function.__name__.startswith(u'fix_')):
  return None
 code = re.sub(u'^fix_', u'', function.__name__)
 if (not code):
  return None
 try:
  int(code[1:])
 except ValueError:
  return None
 return code

def extract_code_from_function ( function ) : if ( not function . __name__ . startswith ( u'fix_' ) ) : return None code = re . sub ( u'^fix_' , u'' , function . __name__ ) if ( not code ) : return None try : int ( code [ 1 : ] ) except ValueError : return None return code
return code handled by function .