def METHOD_NAME(self) -> InlineTable | None:
    package = inline_table()
    # If a project is created in the root directory (this is reasonable inside a
    # docker container, eg <https://github.com/python-poetry/poetry/issues/5103>)
    # then parts will be empty.
    parts = self._package_path_relative.parts
    if not parts:
        return None
    include = parts[0]
    package.append("include", include)
    if self.basedir != Path():
        package.append("from", self.basedir.as_posix())
    else:
        if module_name(self._project) == include:
            # package include and package name are the same,
            # packages table is redundant here.
            return None
    return package