def METHOD_NAME(nf_type, nf_format=None):
    types = {
        "string": "string",
        "integer": "int",
        "number": "float",
        "boolean": "boolean",
        "object": "hash"
    }
    str_types = {
        "file-path": "file",
        "directory-path": "string",  # So far we will stick with strings dx://...
        "path": "string"
    }
    if nf_type == "string" and nf_format in str_types:
        return str_types[nf_format]
    elif nf_type in types:
        return types[nf_type]
    raise Exception("type {} is not supported by DNAnexus".format(nf_type))