code: def run(self):
          
          wanted_groups = self.parse()
  
          deps = []
          invalid_groups = []
          for grp in wanted_groups:
              if grp in dep_groups: deps.extend(dep_groups[grp])
              else:                 invalid_groups.append(grp)
  
          if invalid_groups or not wanted_groups:
              print("Available dependency groups:", ", ".join(sorted(dep_groups.keys())))
              if invalid_groups:
                  print(f"Error: Invalid group name(s): {', '.join(invalid_groups)}")
                  exit(1)
          else:
              # prepare for shell word splitting (no whitespace in items)
              deps = [re.sub(" ", "", x, 0) for x in sorted(set(deps))]
              if self.dep_conda:
                  for i in range(len(deps)):
                      # strip pip-specific syntax
                      deps[i] = re.sub(r';.*',     '',         deps[i])
                      # rename mismatching package names
                      deps[i] = re.sub(r'^torch>', 'pytorch>', deps[i])
              if self.dep_quote:
                  # for manual copy-n-paste (assuming no " in vars)
                  print(" ".join(map(lambda x: f'"{x}"', deps)))
              else:
                  # if fed directly to `pip install` via backticks/$() don't quote
                  print(" ".join(deps))
docs: Run command.