def METHOD_NAME(self, dpt_class: DPTBase):
    """Extract dpt number from class docstring."""
    docstring = dpt_class.__doc__
    try:
        for line in docstring.splitlines():
            text = line.strip()
            if text.startswith("DPT"):
                return text.split()[1]
    except IndexError:
        print(f"Error: Could not read docstring for: {dpt_class}")
    print(f"Error: Could not find DPT in docstring for: {dpt_class}")
    raise ValueError