<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def s_supply(self, bus):
 """ Returns the total complex power generation capacity. """

        Sg = array([complex(g.p, g.q) for g in self.generators if
                   (g.bus == bus) and not g.is_load], dtype=complex64)

        if len(Sg):
            return sum(Sg)
        else:
            return 0 + 0j