<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_rdump(filename):
 """ Read data formatted using the R dump format Parameters filename: str Returns ------- data : OrderedDict """

    contents = open(filename).read().strip()
    names = [name.strip() for name in re.findall(r'^(\w+) <-', contents, re.MULTILINE)]
    values = [value.strip() for value in re.split('\w+ +<-', contents) if value]
    if len(values) != len(names):
        raise ValueError("Unable to read file. Unable to pair variable name with value.")
    d = OrderedDict()
    for name, value in zip(names, values):
        d[name.strip()] = _rdump_value_to_numpy(value.strip())
    return d