<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cn_occupation_energy( self, delta_occupation=None ):
 """ The coordination-number dependent energy for this site. Args: delta_occupation (:obj:Dict(Str:Int), optional):
 A dictionary of a change in (site-type specific) coordination number, e.g. { 'A' : 1, 'B' : -1 }. If this is not None, the coordination-number dependent energy is calculated including these changes in neighbour-site occupations. Defaults to None Returns: (Float):
 The coordination-number dependent energy for this site. """

        nn_occupations = self.site_specific_nn_occupation()
        if delta_occupation:
            for site in delta_occupation:
                assert( site in nn_occupations )
                nn_occupations[ site ] += delta_occupation[ site ]
        return sum( [ self.cn_occupation_energies[ s ][ n ] for s, n in nn_occupations.items() ] )