function genAttrSegments (
    attrs
  ) {
    return attrs.map(function (ref) {
      var name = ref.name;