# Path: lepo/excs.py
# class InvalidParameterDefinition(ImproperlyConfigured):
#     pass


from lepo.excs import InvalidParameterDefinition

    def cast(self, api, value):  # pragma: no cover
        raise NotImplementedError('Subclasses must implement cast')

    def get_value(self, request, view_kwargs):  # pragma: no cover
        """
        :type request: WSGIRequest
        :type view_kwargs: dict
        """
        raise NotImplementedError('Subclasses must implement get_value')


class BaseTopParameter(BaseParameter):
    """
    Top-level Parameter, such as in an operation
    """

    def __init__(self, data, api=None, operation=None):
        super().__init__(data, api=api)
        self.operation = operation

    @property
    def name(self):
        return self.data['name']

    @property
    def in_body(self):
        return self.location in ('formData', 'body')

    def get_value(self, request, view_kwargs):

# Path: lepo/excs.py
# class InvalidParameterDefinition(ImproperlyConfigured):
#     pass


# Path: lepo/apidef/parameter/base.py
from lepo.excs import InvalidParameterDefinition


    def cast(self, api, value):  # pragma: no cover
        raise NotImplementedError('Subclasses must implement cast')

    def get_value(self, request, view_kwargs):  # pragma: no cover
        """
        :type request: WSGIRequest
        :type view_kwargs: dict
        """
        raise NotImplementedError('Subclasses must implement get_value')


class BaseTopParameter(BaseParameter):
    """
    Top-level Parameter, such as in an operation
    """

    def __init__(self, data, api=None, operation=None):
        super().__init__(data, api=api)
        self.operation = operation

    @property
    def name(self):
        return self.data['name']

    @property
    def in_body(self):
        return self.location in ('formData', 'body')

    def get_value(self, request, view_kwargs):

        raise InvalidParameterDefinition(f'unsupported `in` value {self.location!r} in {self!r}')  # pragma: no cover