<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(dist, args=None):
 """Update the given distribution and all of its dependencies :param dist: the distribution to check :type dist: :class:`pkg_resources.Distribution` | str :param args: extra arguments for the install command. this is somewhat equivalent to: pip install -U <dist> args :type args: list :returns: None :rtype: None :raises: class:`pkg_resources.DistributionNotFound` """

    dist = pkg_resources.get_distribution(dist)
    InstallCommand = pip.commands['install']
    ic = InstallCommand()
    iargs = ['-U', dist.project_name]
    if args:
        iargs.extend(args)
    ic.main(iargs)