code: def profile_delete(self):
          
          self.validate_profile_exists()
  
          profile_data = self.profiles.get(self.args.profile_name)
          fqfn = profile_data.get('fqfn')
          with open(fqfn, 'r+') as fh:
              data = json.load(fh)
              for profile in data:
                  if profile.get('profile_name') == self.args.profile_name:
                      data.remove(profile)
              fh.seek(0)
              fh.write(json.dumps(data, indent=2, sort_keys=True))
              fh.truncate()
  
          if not data:
              # remove empty file
              os.remove(fqfn)
docs: Delete an existing profile.