parameters: (self)
return_statement: return [
              {
                  "person": actors_lookup.get(actor.actor_id, {"id": actor.actor_id, "distinct_ids": []}),
                  "appearances": [
                      1 if interval_number in actor.appearances else 0
                      for interval_number in range(self._filter.total_intervals - (self._filter.selected_interval or 0))
                  ],
              }
              for actor in sorted(actor_appearances, key=lambda x: (x.appearance_count, x.actor_id), reverse=True)
          ]
docstring: Creates a response of the form
  
          ```
          [
              {
                  "person": {"distinct_id": ..., ...},
                  "appearance_count": 3,
                  "appearances": [1, 0, 1, 1, 0, 0]
              }
              ...
          ]
          ```
  
          where appearances values represent if the person was active in an
          interval, where the index of the list is the interval it refers to.
docstring_summary: Creates a response of the form
docstring_tokens: Creates a response of the form
function: def actors(self):
          """
          Creates a response of the form
  
          ```
          [
              {
                  "person": {"distinct_id": ..., ...},
                  "appearance_count": 3,
                  "appearances": [1, 0, 1, 1, 0, 0]
              }
              ...
          ]
          ```
  
          where appearances values represent if the person was active in an
          interval, where the index of the list is the interval it refers to.
          """
          actor_query = _build_actor_query(
              filter=self._filter,
              team=self._team,
              filter_by_breakdown=(
                  self._filter.breakdown_values or (self._filter.selected_interval,)
                  if self._filter.selected_interval is not None
                  else None
              ),
          )
  
          actor_appearances = [
              AppearanceRow(actor_id=str(row[0]), appearance_count=len(row[1]), appearances=row[1])
              for row in sync_execute(actor_query)
          ]
  
          _, serialized_actors = self.get_actors_from_result(
              [(actor_appearance.actor_id,) for actor_appearance in actor_appearances]
          )
  
          actors_lookup = {str(actor["id"]): actor for actor in serialized_actors}
  
          return [
              {
                  "person": actors_lookup.get(actor.actor_id, {"id": actor.actor_id, "distinct_ids": []}),
                  "appearances": [
                      1 if interval_number in actor.appearances else 0
                      for interval_number in range(self._filter.total_intervals - (self._filter.selected_interval or 0))
                  ],
              }
              for actor in sorted(actor_appearances, key=lambda x: (x.appearance_count, x.actor_id), reverse=True)
          ]
function_tokens: def actors ( self ) : actor_query = _build_actor_query ( filter = self . _filter , team = self . _team , filter_by_breakdown = ( self . _filter . breakdown_values or ( self . _filter . selected_interval , ) if self . _filter . selected_interval is not None else None ) , ) actor_appearances = [ AppearanceRow ( actor_id = str ( row [ 0 ] ) , appearance_count = len ( row [ 1 ] ) , appearances = row [ 1 ] ) for row in sync_execute ( actor_query ) ] _ , serialized_actors = self . get_actors_from_result ( [ ( actor_appearance . actor_id , ) for actor_appearance in actor_appearances ] ) actors_lookup = { str ( actor [ "id" ] ) : actor for actor in serialized_actors } return [ { "person" : actors_lookup . get ( actor . actor_id , { "id" : actor . actor_id , "distinct_ids" : [ ] } ) , "appearances" : [ 1 if interval_number in actor . appearances else 0 for interval_number in range ( self . _filter . total_intervals - ( self . _filter . selected_interval or 0 ) ) ] , } for actor in sorted ( actor_appearances , key = lambda x : ( x . appearance_count , x . actor_id ) , reverse = True ) ]