def generate_relationship(base, direction, return_fn, attrname, local_cls, referred_cls, **kw):
 if (return_fn is backref):
  return return_fn(attrname, **kw)
 elif (return_fn is relationship):
  return return_fn(referred_cls, **kw)
 else:
  raise TypeError(('Unknown relationship function: %s' % return_fn))

def generate_relationship ( base , direction , return_fn , attrname , local_cls , referred_cls , ** kw ) : if ( return_fn is backref ) : return return_fn ( attrname , ** kw ) elif ( return_fn is relationship ) : return return_fn ( referred_cls , ** kw ) else : raise TypeError ( ( 'Unknown relationship function: %s' % return_fn ) )
generate a :func: .