<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def iodp_samples_srm(df, spec_file='specimens.txt',samp_file="samples.txt",site_file="sites.txt",dir_path='.', input_dir_path='',comp_depth_key="",lat="",lon=""):
 """ Convert IODP samples data generated from the SRM measurements file into datamodel 3.0 MagIC samples file. Default is to overwrite the output files in your working directory. Parameters df : str Pandas DataFrame of SRM Archive data dir_path : str working directory, default "." input_dir_path : str input file directory IF different from dir_path, default "" spec_file : str output specimens.txt file name samp_file : str output samples.txt file name site_file : str output sites.txt file name comp_depth_key : str if not "", there is a composite depth model, for example 'Depth CSF-B (m)' lat : float latitude of hole location lon : float longitude of hole location NOTE: all output files will overwrite existing files. Returns -------- type - Tuple : (True or False indicating if conversion was sucessful,file names written) """

    # define required columns for samples, sites, locations (holes).
    spec_reqd_columns=['specimen','sample','result_quality','method_codes','volume',\
                       'specimen_name_alternatives','citations']
    samp_reqd_columns=['sample','site','result_type','result_quality',\
                       'azimuth','dip','azimuth_correction','method_codes','citations','core_depth','composite_depth']
    site_reqd_columns=['site','location','lat','lon','result_type','result_quality','method_codes',\
                       'core_depth','composite_depth',\
                       'geologic_types','geologic_classes','geologic_lithologies',\
                      'age','age_low','age_high','age_unit','citations']
    # fix the path names for input and output directories (if different)
    input_dir_path, output_dir_path = pmag.fix_directories(input_dir_path, dir_path)
    # find the input sample file name downloaded from LORE
    # set the output file names
    spec_out = os.path.join(output_dir_path, spec_file)
    samp_out = os.path.join(output_dir_path, samp_file)
    site_out = os.path.join(output_dir_path, site_file)
    # read in the data from the downloaded .csv file
    # create the MagIC data model 3.0 DataFrames with the required column
    specimens_df=pd.DataFrame(columns = spec_reqd_columns)
    samples_df=pd.DataFrame(columns = samp_reqd_columns)
    sites_df=pd.DataFrame(columns = site_reqd_columns)
    # set some column headers for the sample master .csv file
    depth_key = "Depth CSF-A (m)"
    text_key = "Text ID"
    date_key = "Date sample logged"
    volume_key = 'Volume (cm3)'
    # convert the meta data in the sample master to MagIC datamodel 3
    # construct the sample name

    holes,specimens=iodp_sample_names(df)
    # put the sample name in the specimen, sample, site
    specimens_df['specimen']=specimens
    specimens_df['sample']=specimens
    samples_df['sample']=specimens
    samples_df['site']=specimens
    samples_df['core_depth']=df[depth_key]
    if comp_depth_key: samples_df['composite_depth']=df[comp_depth_key]

    # add in the rest to the sites table
    sites_df['site']=specimens
    sites_df['core_depth']=df[depth_key]
    sites_df['lat']=lat
    sites_df['lon']=lon
    sites_df['result_type']='i'
    sites_df['result_quality']='g'
    sites_df['method_codes']='FS-C-DRILL-IODP'
    sites_df['location']=holes[0]
    sites_df['citations']="This study"
    if comp_depth_key: sites_df['composite_depth']=df[comp_depth_key]
    # now do the samples

    samples_df['method_codes']='FS-C-DRILL-IODP:SP-SS-C:SO-V' # could put in sampling tool...
    samples_df['site']=specimens # same as sample and specimen name
    samples_df['result_type']='i'
    samples_df['result_type']='g'
    samples_df['azimuth']='0'
    samples_df['dip']='0'
    samples_df['citations']='This study'

    # NEED TO ADD TIMESTAMP FROM TIMESTAMP KEY SOMEDAY
    # and the specimens
    specimens_df['result_quality']='g'
    specimens_df['method_codes']='FS-C-DRILL-IODP'
    specimens_df['citations']='This study'
    # fill in the np.nan with blanks
    specimens_df.fillna("",inplace=True)
    samples_df.fillna("",inplace=True)
    sites_df.fillna("",inplace=True)
    # save the files in the designated spots spec_out, samp_out, site_out and loc_out
    spec_dicts = specimens_df.to_dict('records')
    pmag.magic_write(spec_out, spec_dicts, 'specimens')
    samp_dicts = samples_df.to_dict('records')
    pmag.magic_write(samp_out, samp_dicts, 'samples')
    site_dicts = sites_df.to_dict('records')
    pmag.magic_write(site_out, site_dicts, 'sites')

    return holes[0],specimens