This is what it means to imitate. Anyone who does what is good is from God. Anyone who does what is evil has not seen God. We must think carefully before we imitate the actions of others. Let's look at some examples.
Good grades are good, but cheating is evil.
Don't imitate the cheating. The allowance might be good, but the disrespect for parents is evil. Don't imitate and be disrespectful toward your parents. Intelligence is usually good, but being nasty to others is evil. Don't imitate and treat others badly.