code: def write(models, out=None, base=None, propertybase=None, shorteners=None, logger=logging):
      '''
      models - input Versa models from which output is generated. Must be a sequence
                  object, not an iterator
      '''
      assert out is not None
      if not isinstance(models, list): models = [models]
      shorteners = shorteners or {}
      all_propertybase = [propertybase] if propertybase else []
      all_propertybase.append(VERSA_BASEIRI)
      if any((base, propertybase, shorteners)):
          out.write('
      if base:
          out.write('    * @base: {0}'.format(base))
      out.write('\n\n')
      origin_space = set()
      for m in models:
          origin_space.update(all_origins(m))
      for o in origin_space:
          out.write('
          for o_, r, t, a in m.match(o):
              abbr_r = abbreviate(r, all_propertybase)
              value_format(t)
              out.write('* {0}: {1}\n'.format(abbr_r, value_format(t)))
              for k, v in a.items():
                  abbr_k = abbreviate(k, all_propertybase)
                  out.write('    * {0}: {1}\n'.format(k, value_format(v)))
          out.write('\n')
      return