def METHOD_NAME(self,
                  source: Entity,
                  session: Union[Optional[Entity], Optional[Session]],
                  profile: Optional[Entity],
                  has_profile: bool) -> dict:
    event_type = self.type.strip()
    event = Event.dictionary(
        id=str(uuid4()),
        profile_id=get_entity_id(profile),
        session_id=get_entity_id(session),
        type=event_type,
        properties=self.properties,
        context=self.context)
    event['profile_less'] = not has_profile
    event['metadata']['instance']['id'] = ApiInstance().id
    if self.time.insert:
        event['metadata']['time']['insert'] = self.time.insert
    else:
        event['metadata']['time']['insert'] = datetime.utcnow()
    if self.time.create:
        event['metadata']['time']['create'] = self.time.create
    # To prevent performance bottleneck do not create full event session
    # event["session"] = self._get_event_session(session)
    event['source']['id'] = source.id
    event['config'] = self.options
    event['operation']['update'] = False
    event['operation']['new'] = True
    event['tags']['values'] = tuple(self.tags)
    event['tags']['count'] = len(self.tags)
    if isinstance(session, Session):
        try:
            title = self.context['page']['title']
        except KeyError:
            title = None
        try:
            url = self.context['page']['url']
        except KeyError:
            url = None
        try:
            referer = self.context['page']['referer']['host']
        except KeyError:
            referer = None
        event["os"] = session.os
        event["app"] = session.app
        event["device"] = session.device
        event["hit"]['title'] = title
        event["hit"]['url'] = url
        event["hit"]['referer'] = referer
        event["utm"] = session.utm
    return event