def _CopyField(field, number=None):
positional_args, kwargs = _GetFieldAttributes(field)<EOL>number = number or field.number<EOL>positional_args.append(number)<EOL>return field.__class__(*positional_args, **kwargs)<EOL>
Copies a (potentially) owned ProtoRPC field instance into a new copy.

    Args:
      field: A ProtoRPC message field to be copied.
      number: An integer for the field to override the number of the field.
          Defaults to None.

    Raises:
      TypeError: If the field is not an instance of messages.Field.

    Returns:
      A copy of the ProtoRPC message field.