from dataclasses import dataclass, field


@dataclass
class FooTest:
    class Meta:
        name = "fooTest"

    value: str = field(
        init=False,
        default="Hello"
    )


@dataclass
class Root:
    class Meta:
        name = "root"

    foo_test: str = field(
        init=False,
        default="Hello",
        metadata={
            "name": "fooTest",
            "type": "Element",
            "required": True,
        }
    )

[((9, 17, 12, 5), 'dataclasses.field', 'field', (), '', False, 'from dataclasses import dataclass, field\n'), ((20, 20, 28, 5), 'dataclasses.field', 'field', (), '', False, 'from dataclasses import dataclass, field\n')]