<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_primitives_path(path):
 """Add a new path to look for primitives. The new path will be inserted in the first place of the list, so any primitive found in this new folder will take precedence over any other primitive with the same name that existed in the system before. Args: path (str):
 path to add Raises: ValueError: A `ValueError` will be raised if the path is not valid. """

    if path not in _PRIMITIVES_PATHS:
        if not os.path.isdir(path):
            raise ValueError('Invalid path: {}'.format(path))

        LOGGER.debug('Adding new primitives path %s', path)
        _PRIMITIVES_PATHS.insert(0, os.path.abspath(path))