def _check_boolean(parameter_name, value, parameter_config):
if parameter_config.get('<STR_LIT:type>') != '<STR_LIT>':<EOL><INDENT>return<EOL><DEDENT>if value.lower() not in ('<STR_LIT:1>', '<STR_LIT:true>', '<STR_LIT:0>', '<STR_LIT:false>'):<EOL><INDENT>raise errors.BasicTypeParameterError(parameter_name, value, '<STR_LIT>')<EOL><DEDENT>
Checks if a boolean value is valid.

    This is called by the transform_parameter_value function and shouldn't be
    called directly.

    This checks that the string value passed in can be converted to a valid
    boolean value.

    Args:
      parameter_name: A string containing the name of the parameter, which is
        either just a variable name or the name with the index appended. For
        example 'var' or 'var[2]'.
      value: A string containing the value passed in for the parameter.
      parameter_config: The dictionary containing information specific to the
        parameter in question. This is retrieved from request.parameters in
        the method config.

    Raises:
      BasicTypeParameterError: If the given value is not a valid boolean
        value.