def METHOD_NAME(self, state, timeout=480, sleep=5):
    """
    Wait till state of catalog source resource is the same as required one
    passed in the state parameter.
    Args:
        state (str): Desired state of catalog source object
        timeout (int): Timeout in seconds to wait for desired state
        sleep (int): Time in seconds to sleep between attempts
    Raises:
        ResourceWrongStatusException: In case the catalog source is not in
            expected state.
    """
    self.check_name_is_specified()
    sampler = TimeoutSampler(timeout, sleep, self.check_state, state=state)
    if not sampler.wait_for_func_status(True):
        raise ResourceWrongStatusException(
            f"Catalog source: {self.resource_name} is not in expected "
            f"state: {state}"
        )