code: def percent_initiated_interactions(records, user):
      
      if len(records) == 0:
          return 0
  
      initiated = sum(1 for r in records if r.direction == 'out')
      return initiated / len(records)
docs: The percentage of calls initiated by the user.