<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_fd (self):
 """Create open file descriptor."""

        if self.filename is None:
            return i18n.get_encoded_writer(encoding=self.output_encoding,
                                           errors=self.codec_errors)
        return codecs.open(self.filename, "wb", self.output_encoding,
                           self.codec_errors)