<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def swagger_definition(self, base_path=None, **kwargs):
 """ return a valid swagger spec, with the values passed. """

        return Swagger(
            {
                "info": Info(
                    {
                        key: kwargs.get(key, self.DEFAULT_INFO.get(key))
                        for key in Info.fields.keys()
                        if key in kwargs or key in self.DEFAULT_INFO
                    }
                ),
                "paths": self.paths,
                "swagger": "2.0",
                "basePath": base_path,
            }
        ).to_primitive()