nl: call the method self.represent_scalar with 2 arguments: string 'tag:yaml.org,2002:str' and data converted into a string, return the result.
code: return self . represent_scalar ( 'tag:yaml.org,2002:str' , str ( data ) )