<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stat(self, mpath):
 """Return available dirent info for the given Manta path."""

        parts = mpath.split('/')
        if len(parts) == 0:
            raise errors.MantaError("cannot stat empty manta path: %r" % mpath)
        elif len(parts) <= 3:
            raise errors.MantaError("cannot stat special manta path: %r" %
                                    mpath)
        mparent = udirname(mpath)
        name = ubasename(mpath)
        dirents = self.ls(mparent)
        if name in dirents:
            return dirents[name]
        else:
            raise errors.MantaResourceNotFoundError(
                "%s: no such object or directory" % mpath)