def format_group(group, show_url=True):
 out = '\x02{}\x02'.format(group['name'])
 if group['description']:
  out += ': "{}"'.format(formatting.truncate(group['description']))
 out += ' - Owned by \x02{}\x02.'.format(group['creator']['username'])
 if show_url:
  out += ' - {}'.format(web.try_shorten(group['permalink_url']))
 return out

def format_group ( group , show_url = True ) : out = '\x02{}\x02' . format ( group [ 'name' ] ) if group [ 'description' ] : out += ': "{}"' . format ( formatting . truncate ( group [ 'description' ] ) ) out += ' - Owned by \x02{}\x02.' . format ( group [ 'creator' ] [ 'username' ] ) if show_url : out += ' - {}' . format ( web . try_shorten ( group [ 'permalink_url' ] ) ) return out
takes a soundcloud group and returns a formatting string .