<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_package_dir_name(self, nb):
 """This is the name of the package we will be creating. """


        package_dir = self.package_dir

        if not package_dir:
            package_dir = getcwd()

        package_name = self.package_name

        if not package_name:
            doc = ExtractInlineMetatabDoc(package_url="metapack+file:" + package_dir).run(nb)

            if not doc:
                raise NotebookError("Notebook does not have an inline metatab doc")

            t = doc.find_first('Root.Name', section='Root')

            if not t:
                raise NotebookError("Inline Metatab doc doesnt have a Root.Name term")

            package_name = doc.as_version(None)

        return package_dir, package_name