code: def from_raw_profiles(cls, raw_profiles, profile_name, cli_vars,
                            target_override=None, threads_override=None):
          
          if profile_name not in raw_profiles:
              raise DbtProjectError(
                  "Could not find profile named '{}'".format(profile_name)
              )
  
          # First, we've already got our final decision on profile name, and we
          # don't render keys, so we can pluck that out
          raw_profile = raw_profiles[profile_name]
  
          user_cfg = raw_profiles.get('config')
  
          return cls.from_raw_profile_info(
              raw_profile=raw_profile,
              profile_name=profile_name,
              cli_vars=cli_vars,
              user_cfg=user_cfg,
              target_override=target_override,
              threads_override=threads_override,
          )
docs: :param raw_profiles dict: The profile data, from disk as yaml.
          :param profile_name str: The profile name to use.
          :param cli_vars dict: The command-line variables passed as arguments,
              as a dict.
          :param target_override Optional[str]: The target to use, if provided on
              the command line.
          :param threads_override Optional[str]: The thread count to use, if
              provided on the command line.
          :raises DbtProjectError: If there is no profile name specified in the
              project or the command line arguments
          :raises DbtProfileError: If the profile is invalid or missing, or the
              target could not be found
          :returns Profile: The new Profile object.