def save_testcase(self, state, prefix, message=''):
        """
        Save the environment from `state` to storage. Return a state id
        describing it, which should be an int or a string.

        :param State state: The state to serialize
        :param str message: The message to add to output
        :return: A state id representing the saved state
        """
        self._named_key_prefix = prefix

        # TODO / FIXME: We should move workspace to core/workspace and create a workspace for evm and native binaries
        # The workspaces should override `save_testcase` method
        #
        # Below is native-only
        self.save_summary(state, message)
        self.save_trace(state)
        self.save_constraints(state)
        self.save_input_symbols(state)

        for stream_name, data in state.platform.generate_workspace_files().items():
            with self._named_stream(stream_name, binary=True) as stream:
                if isinstance(data, str):
                    data = data.encode()
                stream.write(data)

        self._store.save_state(state, self._named_key('pkl'))
        return self._last_id
def save_testcase ( self , state , prefix , message = '' ) : self . _named_key_prefix = prefix self . save_summary ( state , message ) self . save_trace ( state ) self . save_constraints ( state ) self . save_input_symbols ( state ) for stream_name , data in state . platform . generate_workspace_files ( ) . items ( ) : with self . _named_stream ( stream_name , binary = True ) as stream : if isinstance ( data , str ) : data = data . encode ( ) stream . write ( data ) self . _store . save_state ( state , self . _named_key ( 'pkl' ) ) return self . _last_id
Save the environment from `state` to storage. Return a state id
        describing it, which should be an int or a string.

        :param State state: The state to serialize
        :param str message: The message to add to output
        :return: A state id representing the saved state