It might be a little cleaner to just due to the converse statement and do substitute `name in self.dimensions` for this condition, e.g.,:
```python
if name not in self.dimensions:
    # variable is not a coordinate
    try:
        variables[name] = ...
    except TypeError:
        pass
```