# Path: django_docker_helpers/utils.py
# def coerce_str_to_bool(val: t.Union[str, int, bool, None], strict: bool = False) -> bool:
#     """
#     Converts a given string ``val`` into a boolean.
# 
#     :param val: any string representation of boolean
#     :param strict: raise ``ValueError`` if ``val`` does not look like a boolean-like object
#     :return: ``True`` if ``val`` is thruthy, ``False`` otherwise.
# 
#     :raises ValueError: if ``strict`` specified and ``val`` got anything except
#      ``['', 0, 1, true, false, on, off, True, False]``
#     """
#     if isinstance(val, str):
#         val = val.lower()
# 
#     flag = ENV_STR_BOOL_COERCE_MAP.get(val, None)
# 
#     if flag is not None:
#         return flag
# 
#     if strict:
#         raise ValueError('Unsupported value for boolean flag: `%s`' % val)
# 
#     return bool(val)


import logging
import os
import typing as t
from django_docker_helpers.utils import coerce_str_to_bool
        :param default: default value if there's no object by specified path
        :param coerce_type: cast a type of a value to a specified one
        :param coercer: perform a type casting with specified callback
        :param kwargs: additional arguments inherited parser may need
        :return: value or default
        """
        raise NotImplementedError

    @staticmethod
    def coerce(val: t.Any,
               coerce_type: t.Optional[t.Type] = None,
               coercer: t.Optional[t.Callable] = None) -> t.Any:
        """
        Casts a type of ``val`` to ``coerce_type`` with ``coercer``.

        If ``coerce_type`` is bool and no ``coercer`` specified it uses
        :func:`~django_docker_helpers.utils.coerce_str_to_bool` by default.

        :param val: a value of any type
        :param coerce_type: any type
        :param coercer: provide a callback that takes ``val`` and returns a value with desired type
        :return: type casted value
        """
        if not coerce_type and not coercer:
            return val

        if coerce_type and type(val) is coerce_type:
            return val

        if coerce_type and coerce_type is bool and not coercer:

# Path: django_docker_helpers/utils.py
# def coerce_str_to_bool(val: t.Union[str, int, bool, None], strict: bool = False) -> bool:
#     """
#     Converts a given string ``val`` into a boolean.
# 
#     :param val: any string representation of boolean
#     :param strict: raise ``ValueError`` if ``val`` does not look like a boolean-like object
#     :return: ``True`` if ``val`` is thruthy, ``False`` otherwise.
# 
#     :raises ValueError: if ``strict`` specified and ``val`` got anything except
#      ``['', 0, 1, true, false, on, off, True, False]``
#     """
#     if isinstance(val, str):
#         val = val.lower()
# 
#     flag = ENV_STR_BOOL_COERCE_MAP.get(val, None)
# 
#     if flag is not None:
#         return flag
# 
#     if strict:
#         raise ValueError('Unsupported value for boolean flag: `%s`' % val)
# 
#     return bool(val)


# Path: django_docker_helpers/config/backends/base.py
import logging
import os
import typing as t
from django_docker_helpers.utils import coerce_str_to_bool

        :param default: default value if there's no object by specified path
        :param coerce_type: cast a type of a value to a specified one
        :param coercer: perform a type casting with specified callback
        :param kwargs: additional arguments inherited parser may need
        :return: value or default
        """
        raise NotImplementedError

    @staticmethod
    def coerce(val: t.Any,
               coerce_type: t.Optional[t.Type] = None,
               coercer: t.Optional[t.Callable] = None) -> t.Any:
        """
        Casts a type of ``val`` to ``coerce_type`` with ``coercer``.

        If ``coerce_type`` is bool and no ``coercer`` specified it uses
        :func:`~django_docker_helpers.utils.coerce_str_to_bool` by default.

        :param val: a value of any type
        :param coerce_type: any type
        :param coercer: provide a callback that takes ``val`` and returns a value with desired type
        :return: type casted value
        """
        if not coerce_type and not coercer:
            return val

        if coerce_type and type(val) is coerce_type:
            return val

        if coerce_type and coerce_type is bool and not coercer:

            coercer = coerce_str_to_bool