def format_user_agent(name=None):
 parts = [(u'Mopidy/%s' % mopidy.__version__), (u'%s/%s' % (platform.python_implementation(), platform.python_version()))]
 if name:
  parts.insert(0, name)
 return u' '.join(parts)

def format_user_agent ( name = None ) : parts = [ ( u'Mopidy/%s' % mopidy . __version__ ) , ( u'%s/%s' % ( platform . python_implementation ( ) , platform . python_version ( ) ) ) ] if name : parts . insert ( 0 , name ) return u' ' . join ( parts )
construct a user-agent suitable for use in client code .