How to create an attribute set programmatically?

See also: