code: def battedball_cd(cls, event_cd, event_tx, ab_des):
          
          _event_tx = event_tx.lower()
          # Fly Out
          if _event_tx in cls.EVENT_02_GENERIC_OUT_FLYBALL:
              return 'F'
          # Line Out
          elif _event_tx in cls.EVENT_02_GENERIC_OUT_LINEDRIVE:
              return 'L'
          # Pop Out
          elif _event_tx in cls.EVENT_02_GENERIC_OUT_POPUP:
              return 'P'
          # Grounder
          elif _event_tx in cls.EVENT_02_GENERIC_OUT_GROUNDBALL:
              return 'G'
          # Force out, double play, triple play
          elif _event_tx in cls.EVENT_02_GENERIC_OUT_OTHER:
              return cls._battedball_cd(ab_des)
          # Single, 2B, 3B, HR
          elif event_cd in cls.EVENT_CD_HITS:
              return cls._battedball_cd(ab_des)
          # Unknown
          else:
              return ''
docs: Batted ball Code for Retrosheet
          :param event_cd: Event code
          :param event_tx: Event text
          :param ab_des: at bat description
          :return: battedball_cd(str)