<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_path(self, path, path_item):
 """ for a given path, add the path items. """

        if path not in self._swagger:
            self._swagger[path] = path_item
        else:
            for method, definition in path_item.items():
                if definition is not None:
                    setattr(self._swagger[path], method, definition)