'Parse all arguments in the namespace to validate whether all required
arguments have been set.
:param namespace: The namespace object.
:raises: ValueError if a require argument was not set.'

def parse(self, namespace):

    if self._custom_validator:
        try:
            self._custom_validator(namespace, self)
        except TypeError:
            raise ValueError('Custom    validator    must    be    a    function    that    takes    two    arguments.')
    try:
        if namespace.json_file:
            try:
                with open(namespace.json_file) as file_handle:
                    namespace.json_file = json.load(file_handle)
            except EnvironmentError:
                raise ValueError(('Cannot    access    JSON    request    file:    ' + namespace.json_file))
            except ValueError as err:
                raise ValueError('Invalid    JSON    file:    {}'.format(err))
            other_values = [arg_name(n) for n in self._arg_tree if getattr(namespace, n)]
            if other_values:
                message = '--json-file    cannot    be    combined    with:\n'
                raise ValueError((message + '\n'.join(other_values)))
            self.done = True
            return
    except AttributeError:
        pass
    required_args = self._parse(namespace, self._request_param['name'], True)
    missing_args = [n for n in required_args if (not getattr(namespace, n))]
    if missing_args:
        message = 'The    following    additional    arguments    are    required:\n'
        message += '\n'.join([arg_name(m) for m in missing_args])
        raise ValueError(message)
    self.done = True
