<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(self, name, target):
    "target should be a Table or SyntheticTable"
    if not isinstance(target, (table.Table, SyntheticTable)):
      raise TypeError(type(target), target)
    if name in self:
      # note: this is critical for avoiding cycles
      raise ScopeCollisionError('scope already has', name)
    self.names[name] = target