<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def import_wd_atmcof(self, plfile, atmfile, wdidx, Nabun=19, Nlogg=11, Npb=25, Nints=4):
 """ Parses WD's atmcof and reads in all Legendre polynomials for the given passband. @plfile: path and filename of atmcofplanck.dat @atmfile: path and filename of atmcof.dat @wdidx: WD index of the passed passband. This can be automated but it's not a high priority. @Nabun: number of metallicity nodes in atmcof.dat. For the 2003 version the number of nodes is 19. @Nlogg: number of logg nodes in atmcof.dat. For the 2003 version the number of nodes is 11. @Npb: number of passbands in atmcof.dat. For the 2003 version the number of passbands is 25. @Nints: number of temperature intervals (input lines) per entry. For the 2003 version the number of lines is 4. """


        # Initialize the external atmcof module if necessary:
        # PERHAPS WD_DATA SHOULD BE GLOBAL??
        self.wd_data = libphoebe.wd_readdata(plfile, atmfile)

        # That is all that was necessary for *_extern_planckint() and
        # *_extern_atmx() functions. However, we also want to support
        # circumventing WD subroutines and use WD tables directly. For
        # that, we need to do a bit more work.

        # Store the passband index for use in planckint() and atmx():
        self.extern_wd_idx = wdidx

        # Break up the table along axes and extract a single passband data:
        atmtab = np.reshape(self.wd_data['atm_table'], (Nabun, Npb, Nlogg, Nints, -1))
        atmtab = atmtab[:, wdidx, :, :, :]

        # Finally, reverse the metallicity axis because it is sorted in
        # reverse order in atmcof:
        self.extern_wd_atmx = atmtab[::-1, :, :, :]
        self.content += ['extern_planckint', 'extern_atmx']
        self.atmlist += ['extern_planckint', 'extern_atmx']