<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_metadata(self, handler):
 """ set the meta data """

        if self.metadata is not None:
            handler.write_metadata(self.cname, self.metadata)