def to_dict(self, pipfile: Pipfile = None) -> dict:
_LOGGER.debug("<STR_LIT>")<EOL>pipfile = pipfile or self.pipfile<EOL>if not pipfile:<EOL><INDENT>raise InternalError("<STR_LIT>")<EOL><DEDENT>self.meta.set_hash(pipfile.hash())<EOL>self.sanitize_source_indexes()<EOL>content = {<EOL>"<STR_LIT>": self.meta.to_dict(is_lock=True),<EOL>"<STR_LIT:default>": self.packages.to_pipfile_lock(),<EOL>"<STR_LIT>": self.dev_packages.to_pipfile_lock(),<EOL>}<EOL>return content<EOL>
Create a dict representation of Pipfile.lock content.