def scopes_to_string(scopes):
 if isinstance(scopes, six.string_types):
  return scopes
 else:
  return ' '.join(scopes)

def scopes_to_string ( scopes ) : if isinstance ( scopes , six . string_types ) : return scopes else : return ' ' . join ( scopes )
converts scope value to a string .