<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _smcra_to_str(self, smcra, temp_dir='/tmp/'):
 """ WHATIF's input are PDB format files. Converts a SMCRA object to a PDB formatted string. """

        
        temp_path = tempfile.mktemp( '.pdb', dir=temp_dir )
        
        io = PDBIO()
        io.set_structure(smcra)
        io.save(temp_path)
        
        f = open(temp_path, 'r')
        string = f.read()
        f.close()
        
        os.remove(temp_path)
        
        return string