def METHOD_NAME(
    self,
    enable: bool,
    finding_publishing_frequency: str,
    data_sources: Dict[str, Any],
    tags: Dict[str, str],
) -> str:
    if finding_publishing_frequency not in [
        "FIFTEEN_MINUTES",
        "ONE_HOUR",
        "SIX_HOURS",
    ]:
        finding_publishing_frequency = "SIX_HOURS"
    detector = Detector(
        account_id=self.account_id,
        created_at=datetime.now(),
        finding_publish_freq=finding_publishing_frequency,
        enabled=enable,
        datasources=data_sources,
        tags=tags,
    )
    self.detectors[detector.id] = detector
    return detector.id