def file_from_class_name(class_name):
    """
    Given a class name, returns the header file in which it is defined.
    NOTE: this function assumes the convention of namespaces being directories
          and headers named after the class they define.
    """
    file_name = class_name.split(" ")[0].replace("::", "/") + ".h"
    file_name = file_name.replace("Ptr", "")
    if file_name.startswith("/"):
        return file_name[1:]
    return file_name