code: def update(self, *pkgs, **kwargs):
          
          cmd_list = ['update', '--json', '--yes']
  
          if not pkgs and not kwargs.get('all'):
              raise TypeError("Must specify at least one package to update, or "
                              "all=True.")
  
          cmd_list.extend(
              self._setup_install_commands_from_kwargs(
                  kwargs,
                  ('dry_run', 'no_deps', 'override_channels',
                   'no_pin', 'force', 'all', 'use_index_cache', 'use_local',
                   'alt_hint')))
  
          cmd_list.extend(pkgs)
  
          return self._call_and_parse(cmd_list, abspath=kwargs.get('abspath',
                                                                   True))
docs: Update package(s) (in an environment) by name.