code: def get_formatted_output(self, format_type=FormatType.JSON):
          
          if format_type not in [FormatType.JSON, FormatType.YAML]:
              raise ArgumentInvalid('"format_type" should be one of FormatType.JSON / YAML!')
          elif format_type is FormatType.JSON:
              return self._format_json()
          elif format_type is FormatType.YAML:
              return self._format_yaml()
docs: :param format_type: The format need to output.
          :return: formatted output.
          :raise ConversionError: data can't be converted to the specified format_type.