def METHOD_NAME(
    include_builds: bool = False, explicit_only: bool = True
) -> List[CondaRequirement]:
    """
    Return conda requirements by exporting the current environment.
    Skips any pip requirements included in the export. Only requirements that are
    managed by conda are returned.
    """
    command = ["conda", "env", "export", "--json"]
    if not include_builds:
        command.append("--no-builds")
    if explicit_only:
        command.append("--from-history")
    process = subprocess.run(command, capture_output=True)
    parsed = json.loads(process.stdout)
    if "error" in parsed:
        raise CondaError(
            "Encountered an exception while exporting the conda environment: "
            + parsed["error"]
        )
    # If no dependencies are given, this field will not be present
    dependencies = parsed.get("dependencies", [])
    # The string check will exclude nested objects like the 'pip' subtree
    return [CondaRequirement(dep) for dep in dependencies if isinstance(dep, str)]