Ensure that this works:

```python
@setup
def mytask():
    print("I am a setup task")

with dag_maker() as dag:
    mytask.override(task_id='newtask')

assert len(dag.task_group.children) == 1
setup_task = dag.task_group.children["newtask"]
assert setup_task._is_setup
```
and teardown also works
""":meta private:"""
        return self
Chainable = Union[DependencyMixin, Sequence[DependencyMixin]]
def chain(*tasks: DependencyMixin | Sequence[DependencyMixin]) -> None:
    r"""
    Given a number of tasks, builds a dependency chain.
    This function accepts values of BaseOperator (aka tasks), EdgeModifiers (aka Labels), XComArg, TaskGroups,
    or lists containing any mix of these types (or a mix in the same list). If you want to chain between two
    lists you must ensure they have the same length.
    Using classic operators/sensors:
    .. code-block:: python
        chain(t1, [t2, t3], [t4, t5], t6)
    is equivalent to::
          / -> t2 -> t4 \
        t1               -> t6
          \ -> t3 -> t5 /
    .. code-block:: python
        t1.set_downstream(t2)
        t1.set_downstream(t3)
        t2.set_downstream(t4)
        t3.set_downstream(t5)
        t4.set_downstream(t6)
        t5.set_downstream(t6)
    Using task-decorated functions aka XComArgs:
    .. code-block:: python
        chain(x1(), [x2(), x3()], [x4(), x5()], x6())
    is equivalent to::
          / -> x2 -> x4 \
        x1               -> x6