def readfile(format, filename, lazy = False, opt = None, *args, **kwargs):
    if not os.path.isfile(filename):
        raise IOError, "No such file: '%s'" % filename
    format = format.lower()
    # Eagerly evaluate the supplier functions in order to report
    # errors in the format and errors in opening the file.
    # Then switch to an iterator...
    if format=="sdf":
        return _filereader_sdf(filename)
    elif format=="mol":
        def mol_reader():
            yield Molecule(Chem.MolFromMolFile(filename, *args, **kwargs))
        return mol_reader()
    elif format=="pdb":
        def mol_reader():
            yield Molecule(Chem.MolFromPDBFile(filename, *args, **kwargs))
        return mol_reader()
    elif format=="mol2":
        return _filereader_mol2(filename)
    elif format=="smi":
        iterator = Chem.SmilesMolSupplier(filename, delimiter=" \t",
                                          titleLine=True, *args, **kwargs)
        def smi_reader():
            for mol in iterator:
                yield Molecule(mol)
        return smi_reader()
    elif format=='inchi' and Chem.INCHI_AVAILABLE:
        def inchi_reader():
            for line in open(filename, 'r'):
                mol = Chem.inchi.MolFromInchi(line.strip(), *args, **kwargs)
                yield Molecule(mol)
        return inchi_reader()
    else:
        raise ValueError, "%s is not a recognised RDKit format" % format
Return the nth Standardized moment of a random expression i.e.
dataset/ETHPy150Open oddt/oddt/oddt/toolkits/rdk.py/readfile--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/stats/rv_interface.py/smoment