def obtain_model(show_ver):
 match = re.search('Cisco (.+?) .+bytes of memory', show_ver)
 if match:
  return match.group(1)
 else:
  return None

def obtain_model ( show_ver ) : match = re . search ( 'Cisco (.+?) .+bytes of memory' , show_ver ) if match : return match . group ( 1 ) else : return None
function that processes show version information to obtain the model .