def METHOD_NAME(
    self,
    env_name: str,
    schema: Dict[str, Any],
) -> Any:
    """
    Get a value from the environment.
    Args:
        env_name: Environment variable name.
        schema: Schema for the value we are retrieving.
    Returns:
        Value retrieved from the environment.
    """
    if "$ref" in schema:
        schema = self._resolve_ref(schema["$ref"])
    if "type" in schema:
        if schema["type"] in ("string", "integer", "boolean"):
            return self._env.get(env_name, None)
        if schema["type"] == "object":
            return self._get_object(env_name, schema)
        if schema["type"] == "array":
            return self._get_array(env_name, schema)
    # Get all the properties as we won't have typing conflicts
    if "allOf" in schema:
        all_of_mapping = self._get_mapping(env_name, *schema["allOf"])
        # Merging all subtypes data together
        return dict(ChainMap(*all_of_mapping.values()))
    # Get all the properties as we won't have typing conflicts
    if "oneOf" in schema:
        one_of_mapping = self._get_mapping(env_name, *schema["oneOf"])
        # Merging all subtypes data together
        return dict(ChainMap(*one_of_mapping.values()))
    # Get all the properties and resolve conflicts after
    if "anyOf" in schema:
        any_of_mapping = self._get_mapping(env_name, *schema["anyOf"])
        if any_of_mapping:
            any_of_values = list(any_of_mapping.values())
            # If all subtypes are primary types, return the first subtype data
            if all(isinstance(value, str) for value in any_of_values):
                return any_of_values[0]
            # If all subtypes are dicts, merge the subtypes data in a single dict.
            # Do not worry if subtypes share a field name, as the value is from a
            # single environment variable and will have the same value.
            if all(isinstance(value, dict) for value in any_of_values):
                return dict(ChainMap(*any_of_values))
        return None
    raise ValueError(f"{env_name}: unhandled schema {schema}")