def expand_dimension_links(metadata):
 links = []
 for link in metadata:
  if isinstance(link, compat.string_type):
   link = {'name': link}
  elif ('name' not in link):
   raise ModelError('Dimension link has no name')
  links.append(link)
 return links

def expand_dimension_links ( metadata ) : links = [ ] for link in metadata : if isinstance ( link , compat . string_type ) : link = { 'name' : link } elif ( 'name' not in link ) : raise ModelError ( 'Dimension link has no name' ) links . append ( link ) return links
expands links to dimensions .