"municipality"
(a)means a metropolitan, district or local municipality established in terms of the Local Government: Municipal Structures Act, 1998 (Act No. 117 of 1998); or
(b)in relation to the implementation of a provision of this Act in an area which falls within both a local municipality and a district municipality, means—
(i)the district municipality: or
(ii)the local municipality, if the district municipality, by agreement with the local municipality, has assigned the implementation of that provision in that area to the local municipality;