21.—(1) A society which has as one of its objects the disposal of any article produced or obtained by the work or industry of its members, whether the produce of handicraft, agriculture, animal husbandry, fisheries or otherwise, may provide in its by-laws or may otherwise contract with its members —
(a)
that every such member who produces any such article must dispose of the whole or any specified amount, proportion or description thereof to or through the society; and
(b)
that a member who is proved or adjudged, in accordance with the provisions of this Act and in such manner as may be prescribed by the by-laws, to be guilty of a breach of the by-laws or contract must pay to the society as liquidated damages a sum ascertained or assessed in such manner as may be prescribed by the by-laws.
(2) The validity of a by-law made by a society or a contract entered into under this section is not affected by reason only that it constitutes a contract in restraint of trade.