def is_valid_imdb_title_id(value):
 if (not isinstance(value, basestring)):
  raise TypeError(u'is_valid_imdb_title_id expects a string but got {0}'.format(type(value)))
 return (re.match(u'tt[\\d]{7}', value) is not None)

def is_valid_imdb_title_id ( value ) : if ( not isinstance ( value , basestring ) ) : raise TypeError ( u'is_valid_imdb_title_id expects a string but got {0}' . format ( type ( value ) ) ) return ( re . match ( u'tt[\\d]{7}' , value ) is not None )
return true if value is a valid imdb id for titles .