def METHOD_NAME(
    self, resource_identifier: ResourceIdentifier, on_code_change: Callable
) -> Optional[CodeResourceTrigger]:
    """Create Trigger for the resource type
    Parameters
    ----------
    resource_identifier : ResourceIdentifier
        Resource associated with the trigger
    on_code_change : Callable
        Callback for code change
    Returns
    -------
    Optional[CodeResourceTrigger]
        CodeResourceTrigger for the resource
    """
    resource = get_resource_by_id(self._stacks, resource_identifier)
    generator = self._get_generator_function(resource_identifier)
    resource_type = self._get_resource_type(resource_identifier)
    if not generator or not resource or not resource_type:
        return None
    return cast(CodeTriggerFactory.GeneratorFunction, generator)(
        self, resource_identifier, resource_type, resource, on_code_change
    )