code: public static SpreadMap toSpreadMap(List self) {
          if (self == null)
              throw new GroovyRuntimeException("Fail to convert List to SpreadMap, because it is null.");
          else if (self.size() % 2 != 0)
              throw new GroovyRuntimeException("Fail to convert List to SpreadMap, because it's size is not even.");
          else
              return new SpreadMap(self);
      }
docs: Creates a spreadable map from this list.
  <p>
  @param self a list
  @return a newly created SpreadMap
  @see groovy.lang.SpreadMap#SpreadMap(java.util.List)
  @see #toSpreadMap(java.util.Map)
  @since 1.8.0