def generate_nodeinfo2_document(**kwargs):
return {<EOL>"<STR_LIT:version>": "<STR_LIT:1.0>",<EOL>"<STR_LIT>": {<EOL>"<STR_LIT>": kwargs['<STR_LIT>']['<STR_LIT>'],<EOL>"<STR_LIT:name>": kwargs['<STR_LIT>']['<STR_LIT:name>'],<EOL>"<STR_LIT>": kwargs['<STR_LIT>']['<STR_LIT>'],<EOL>"<STR_LIT:version>": kwargs['<STR_LIT>']['<STR_LIT:version>'],<EOL>},<EOL>"<STR_LIT>": {<EOL>"<STR_LIT:name>": kwargs.get('<STR_LIT>', {}).get('<STR_LIT:name>', None),<EOL>"<STR_LIT>": kwargs.get('<STR_LIT>', {}).get('<STR_LIT>', None),<EOL>"<STR_LIT>": kwargs.get('<STR_LIT>', {}).get('<STR_LIT>', None),<EOL>},<EOL>"<STR_LIT>": kwargs.get('<STR_LIT>', ["<STR_LIT>"]),<EOL>"<STR_LIT>": kwargs.get('<STR_LIT>', '<STR_LIT>'),<EOL>"<STR_LIT>": {<EOL>"<STR_LIT>": kwargs.get('<STR_LIT>', {}).get('<STR_LIT>', []),<EOL>"<STR_LIT>": kwargs.get('<STR_LIT>', {}).get('<STR_LIT>', []),<EOL>},<EOL>"<STR_LIT>": kwargs['<STR_LIT>'],<EOL>"<STR_LIT>": {<EOL>"<STR_LIT>": {<EOL>"<STR_LIT>": kwargs.get('<STR_LIT>', {}).get('<STR_LIT>', {}).get('<STR_LIT>'),<EOL>"<STR_LIT>": kwargs.get('<STR_LIT>', {}).get('<STR_LIT>', {}).get('<STR_LIT>'),<EOL>"<STR_LIT>": kwargs.get('<STR_LIT>', {}).get('<STR_LIT>', {}).get('<STR_LIT>'),<EOL>"<STR_LIT>": kwargs.get('<STR_LIT>', {}).get('<STR_LIT>', {}).get('<STR_LIT>'),<EOL>},<EOL>"<STR_LIT>": kwargs.get('<STR_LIT>', {}).get('<STR_LIT>'),<EOL>"<STR_LIT>": kwargs.get('<STR_LIT>', {}).get('<STR_LIT>'),<EOL>}<EOL>}<EOL>
Generate a NodeInfo2 document.

Pass in a dictionary as per NodeInfo2 1.0 schema:
https://github.com/jaywink/nodeinfo2/blob/master/schemas/1.0/schema.json

Minimum required schema:
    {server:
      baseUrl
      name
      software
      version
    }
    openRegistrations

Protocols default will match what this library supports, ie "diaspora" currently.

:return: dict
:raises: KeyError on missing required items