def disambig_string(info):
 disambig = []
 if (info.data_source and (info.data_source != 'MusicBrainz')):
  disambig.append(info.data_source)
 if isinstance(info, hooks.AlbumInfo):
  if info.media:
   if (info.mediums and (info.mediums > 1)):
    disambig.append(u'{0}x{1}'.format(info.mediums, info.media))
   else:
    disambig.append(info.media)
  if info.year:
   disambig.append(six.text_type(info.year))
  if info.country:
   disambig.append(info.country)
  if info.label:
   disambig.append(info.label)
  if info.albumdisambig:
   disambig.append(info.albumdisambig)
 if disambig:
  return u', '.join(disambig)

def disambig_string ( info ) : disambig = [ ] if ( info . data_source and ( info . data_source != 'MusicBrainz' ) ) : disambig . append ( info . data_source ) if isinstance ( info , hooks . AlbumInfo ) : if info . media : if ( info . mediums and ( info . mediums > 1 ) ) : disambig . append ( u'{0}x{1}' . format ( info . mediums , info . media ) ) else : disambig . append ( info . media ) if info . year : disambig . append ( six . text_type ( info . year ) ) if info . country : disambig . append ( info . country ) if info . label : disambig . append ( info . label ) if info . albumdisambig : disambig . append ( info . albumdisambig ) if disambig : return u', ' . join ( disambig )
generate a string for an albuminfo or trackinfo object that provides context that helps disambiguate similar-looking albums and tracks .