<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def combined(cls, code, path=None, extra_args=None):
 """ Compile combined-json with abi,bin,devdoc,userdoc. @param code: literal solidity code as a string. @param path: absolute path to solidity-file. Note: code & path are mutually exclusive! @param extra_args: Either a space separated string or a list of extra arguments to be passed to the solidity compiler. """


        if code and path:
            raise ValueError('sourcecode and path are mutually exclusive.')

        if path:
            contracts = compile_file(path, extra_args=extra_args)

            with open(path) as handler:
                code = handler.read()

        elif code:
            contracts = compile_code(code, extra_args=extra_args)

        else:
            raise ValueError('either code or path needs to be supplied.')

        sorted_contracts = []
        for name in solidity_names(code):
            sorted_contracts.append(
                (
                    name[1],
                    solidity_get_contract_data(contracts, path, name[1])
                )
            )
        return sorted_contracts