<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Some testing and analysis of the new Snapshot implementation
Step1:  Function to show the generated source code
Step2:  Check generated source code
Generate simple Snapshot without any features using factory
Step3:  Generate Snapshot with overridden .copy method.
Step4:  Check that subclassing with overridden copy needs more overriding.
Step5:  Test subclassing
Step6:  Test subclassing with redundant features (should work / be ignored)
Step7:  Test subclassing with conflicting features (should not work)
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import openpathsampling as paths
import openpathsampling.engines.features as features
from __future__ import print_function
Explanation: Some testing and analysis of the new Snapshot implementation
End of explanation
from IPython.display import Markdown
def code_to_md(snapshot_class):
    md = '```py\n'
    for f, s in snapshot_class.__features__.debug.items():
        if s is not None:
            md += s
        else:
            md += 'def ' + f + '(...):\n    # user defined\n    pass' 
        md += '\n\n'
    md += '```'
    return md
Explanation: Function to show the generated source code
End of explanation
EmptySnap = paths.engines.snapshot.SnapshotFactory('no', [], 'Empty', use_lazy_reversed=False)
Explanation: Check generated source code
Generate simple Snapshot without any features using factory
End of explanation
@features.base.attach_features([
    features.velocities,
    features.coordinates,
    features.box_vectors,
    features.topology
])
class A(paths.BaseSnapshot):
    def copy(self):
        return 'copy'
Explanation: Generate Snapshot with overridden .copy method.
End of explanation
try:
    @features.base.attach_features([
    ])
    class B(A):
        pass
except RuntimeWarning as e:
    print(e)
else:
    raise RuntimeError('Should have raised a RUNTIME warning')    
a = A()
assert(a.copy() == 'copy')
#! ignore
Markdown(code_to_md(A))
#! ignore
Markdown(code_to_md(EmptySnap))
SuperSnap = paths.engines.snapshot.SnapshotFactory(
    'my', [
        paths.engines.features.coordinates,
        paths.engines.features.box_vectors,
        paths.engines.features.velocities
    ], 'No desc', use_lazy_reversed=False)
#! ignore
Markdown(code_to_md(SuperSnap))
MegaSnap = paths.engines.snapshot.SnapshotFactory(
    'mega', [
        paths.engines.features.statics,
        paths.engines.features.kinetics,
        paths.engines.features.engine
    ], 'Long desc', use_lazy_reversed=False)
#! ignore
Markdown(code_to_md(MegaSnap))
Explanation: Check that subclassing with overridden copy needs more overriding.
End of explanation
@features.base.attach_features([
])
class HyperSnap(MegaSnap):
    pass
Explanation: Test subclassing
End of explanation
@features.base.attach_features([
    paths.engines.features.statics,
])
class HyperSnap(MegaSnap):
    pass
Explanation: Test subclassing with redundant features (should work / be ignored)
End of explanation
try:
    @features.base.attach_features([
        paths.engines.features.statics,
        paths.engines.features.coordinates
    ])
    class HyperSnap(MegaSnap):
        pass
except RuntimeWarning as e:
    print(e)
else:
    raise RuntimeError('Should have raised a RUNTIME warning')    
#! ignore
Markdown(code_to_md(paths.engines.openmm.MDSnapshot))
Explanation: Test subclassing with conflicting features (should not work)
End of explanation
<END_TASK>