def is_related_field(model_field):
    """
    Checks if a model field is a related field.
    """
    class_name = model_field.__class__.__name__
    return class_name == 'ForeignKey' or class_name == 'OneToOneField'