<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _calculate_format(self):
 """Calculate and Return the datetime format."""

        _format = self.format_param if self.format_param else self.format
        if self.config['options'].get('format'):
            _format = self.format_js2py(self.config['options'].get('format'))
        else:
            self.config['options']['format'] = self.format_py2js(_format)
        return _format