code: def list_packages(self, installed=True, notinstalled=True):
          
  
          self.profile = Profile()
  
          # Classify packages
          installed_packages = []
          notinstalled_packages = []
  
          for package in self.packages:
              data = {
                  'name': package,
                  'version': None,
                  'description': self.packages.get(package).get('description')
              }
              if package in self.profile.packages:
                  data['version'] = self.profile.get_package_version(
                      package, self.get_package_release_name(package))
                  installed_packages += [data]
              else:
                  notinstalled_packages += [data]
  
          # Print tables
          terminal_width, _ = click.get_terminal_size()
  
          if installed and installed_packages:
  
              # - Print installed packages table
              click.echo('\nInstalled packages:\n')
  
              PACKAGELIST_TPL = ('{name:20} {description:30} {version:<8}')
  
              click.echo('-' * terminal_width)
              click.echo(PACKAGELIST_TPL.format(
                  name=click.style('Name', fg='cyan'), version='Version',
                  description='Description'))
              click.echo('-' * terminal_width)
  
              for package in installed_packages:
                  click.echo(PACKAGELIST_TPL.format(
                      name=click.style(package.get('name'), fg='cyan'),
                      version=package.get('version'),
                      description=package.get('description')))
  
          if notinstalled and notinstalled_packages:
  
              # - Print not installed packages table
              click.echo('\nNot installed packages:\n')
  
              PACKAGELIST_TPL = ('{name:20} {description:30}')
  
              click.echo('-' * terminal_width)
              click.echo(PACKAGELIST_TPL.format(
                  name=click.style('Name', fg='yellow'),
                  description='Description'))
              click.echo('-' * terminal_width)
  
              for package in notinstalled_packages:
                  click.echo(PACKAGELIST_TPL.format(
                      name=click.style(package.get('name'), fg='yellow'),
                      description=package.get('description')))
docs: Return a list with all the installed/notinstalled packages