def METHOD_NAME(self, target: fetchable):
    """Fetch a file.
    :return: None if fetching failed,
        else on disk location of the copied file
    """
    if not isinstance(target, fetchable):
        raise TypeError(f"target must be fetchable instance/derivative: {target}")
    path = pjoin(self.distdir, target.filename)
    uris = iter(target.uri)
    last_exc = RuntimeError("fetching failed for an unknown reason")
    spawn_opts = {"umask": 0o002, "env": self.extra_env}
    if self.userpriv and is_userpriv_capable():
        spawn_opts.update({"uid": portage_uid, "gid": portage_gid})
    for _attempt in range(self.attempts):
        try:
            self._verify(path, target)
            return path
        except errors.MissingDistfile as exc:
            command = self.command
            last_exc = exc
        except errors.ChksumFailure:
            raise
        except errors.FetchFailed as exc:
            last_exc = exc
            if not exc.resumable:
                try:
                    os.unlink(path)
                    command = self.command
                except OSError as e:
                    raise errors.UnmodifiableFile(path, e) from e
            else:
                command = self.resume_command
        # Note we're not even checking the results, the verify portion of
        # the loop handles this. In other words, don't trust the external
        # fetcher's exit code, trust our chksums instead.
        try:
            spawn_bash(
                command % {"URI": next(uris), "FILE": target.filename}, **spawn_opts
            )
        except StopIteration:
            raise errors.FetchFailed(
                target.filename, "ran out of urls to fetch from"
            )
    else:
        raise last_exc