<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run_script(self, script, identifier=_DEFAULT_SCRIPT_NAME):
 """ Run a JS script within the context.\ All code is ran synchronously,\ there is no event loop. It's thread-safe :param script: utf-8 encoded or unicode string :type script: bytes or str :param identifier: utf-8 encoded or unicode string.\ This is used as the name of the script\ (ie: in stack-traces) :type identifier: bytes or str :return: Result of running the JS script :rtype: str :raises V8Error: if there was\ an error running the JS script """

        assert isinstance(script, six.text_type) or _is_utf_8(script)
        assert isinstance(identifier, six.text_type) or _is_utf_8(identifier)

        if isinstance(script, six.text_type):
            script = script.encode('utf-8')

        if isinstance(identifier, six.text_type):
            identifier = identifier.encode('utf-8')

        with _String() as output:
            with _String() as error:
                code = lib.v8cffi_run_script(
                    self._c_context[0],
                    script,
                    len(script),
                    identifier,
                    len(identifier),
                    output.string_ptr,
                    output.len_ptr,
                    error.string_ptr,
                    error.len_ptr)

                if code != lib.E_V8_OK:
                    raise exceptions.get_exception(code)(six.text_type(error))

                return six.text_type(output)