def format_guess(guess):
 for (prop, value) in guess.items():
  if (prop in (u'season', u'episodeNumber', u'year', u'cdNumber', u'cdNumberTotal', u'bonusNumber', u'filmNumber')):
   guess[prop] = int(guess[prop])
  elif isinstance(value, base_text_type):
   if (prop in (u'edition',)):
    value = clean_string(value)
   guess[prop] = canonical_form(value).replace(u'\\', u'')
 return guess

def format_guess ( guess ) : for ( prop , value ) in guess . items ( ) : if ( prop in ( u'season' , u'episodeNumber' , u'year' , u'cdNumber' , u'cdNumberTotal' , u'bonusNumber' , u'filmNumber' ) ) : guess [ prop ] = int ( guess [ prop ] ) elif isinstance ( value , base_text_type ) : if ( prop in ( u'edition' , ) ) : value = clean_string ( value ) guess [ prop ] = canonical_form ( value ) . replace ( u'\\' , u'' ) return guess
format all the found values to their natural type .